Examples of Option


Examples of com.facebook.presto.hive.shaded.org.apache.commons.cli.Option

  @SuppressWarnings("static-access")
  private void init() {

    System.out.println("Initializing HiveMetaTool..");

    Option help = new Option("help", "print this message");
    Option listFSRoot = new Option("listFSRoot", "print the current FS root locations");
    Option executeJDOQL =
        OptionBuilder.withArgName("query-string")
            .hasArgs()
            .withDescription("execute the given JDOQL query")
            .create("executeJDOQL");

    /* Ideally we want to specify the different arguments to updateLocation as separate argNames.
     * However if we did that, HelpFormatter swallows all but the last argument. Note that this is
     * a know issue with the HelpFormatter class that has not been fixed. We specify all arguments
     * with a single argName to workaround this HelpFormatter bug.
     */
    Option updateFSRootLoc =
        OptionBuilder
            .withArgName("new-loc> " + "<old-loc")
            .hasArgs(2)
            .withDescription(
                "Update FS root location in the metastore to new location.Both new-loc and " +
                    "old-loc should be valid URIs with valid host names and schemes." +
                    "When run with the dryRun option changes are displayed but are not " +
                    "persisted. When run with the serdepropKey/tablePropKey option " +
                    "updateLocation looks for the serde-prop-key/table-prop-key that is " +
                    "specified and updates its value if found.")
                    .create("updateLocation");
    Option dryRun = new Option("dryRun" , "Perform a dry run of updateLocation changes.When " +
      "run with the dryRun option updateLocation changes are displayed but not persisted. " +
      "dryRun is valid only with the updateLocation option.");
    Option serdePropKey =
        OptionBuilder.withArgName("serde-prop-key")
        .hasArgs()
        .withValueSeparator()
        .withDescription("Specify the key for serde property to be updated. serdePropKey option " +
           "is valid only with updateLocation option.")
        .create("serdePropKey");
    Option tablePropKey =
        OptionBuilder.withArgName("table-prop-key")
        .hasArg()
        .withValueSeparator()
        .withDescription("Specify the key for table property to be updated. tablePropKey option " +
          "is valid only with updateLocation option.")
View Full Code Here

Examples of com.freewebsys.blog.pojo.Option

      Map<String, Option> optionMap = new HashMap<String, Option>();
      // 循环数组.
      for (Option option : optionList) {
        // 循环数组,放到map里面.
        Option optionTmp = OPTION_DEFAULT_MAP.get(option.getName());
        option.setCnName(optionTmp.getCnName());
        option.setHtml(optionTmp.getHtml());
        option.setOrderId(optionTmp.getOrderId());
        optionMap.put(option.getName(), option);
      }
      // 保存到xml里面.
      File confFile = new File(FreemakerTemplateEngine.WEBAPP_PATH
          + OPTION_CONF_FILE);
View Full Code Here

Examples of com.gistlabs.mechanize.document.html.form.Select.Option

    Form form = page.forms().find("#form");
    Select select = form.findSelect(byIdOrName("person"));
    assertFalse(select.isMultiple());
    assertEquals(3, select.getOptions().size());
   
    Option peter = select.getOption("Peter");
    assertEquals("Peter", peter.getText());
    assertEquals("1", peter.getValue());
    assertFalse(peter.isSelected());
   
    Option john = select.getOption("John");
    assertEquals("John", john.getText());
    assertEquals("2", john.getValue());
    assertFalse(john.isSelected());
   
    assertTrue(select.getOption("Susanna").isSelected());

    peter.select();
    assertTrue(peter.isSelected());
    assertFalse(john.isSelected());
    assertFalse(select.getOption("Susanna").isSelected());
    AbstractDocument response = form.submit();
    assertEquals("OK", response.getTitle());
  }
View Full Code Here

Examples of com.github.jknack.antlr4ide.lang.Option

  }

  @Test
  public void unsupportedOption() throws Exception {

    Option option = createMock(Option.class);
    EClass eClass = createMock(EClass.class);
    EStructuralFeature feature = createMock(EStructuralFeature.class);
    Antlr4Validator validator = PowerMock.createPartialMock(Antlr4Validator.class, "warning");

    expect(option.getName()).andReturn("Some");
    expect(option.eClass()).andReturn(eClass);
    expect(eClass.getEStructuralFeature("name")).andReturn(feature);

    PowerMock.expectPrivate(validator, "warning", "unsupported option 'Some'",
        option, feature);
View Full Code Here

Examples of com.google.appengine.tools.util.Option

      }
      helpLines.add("Use 'help <action>' for a detailed description.");
      helpLines.add("");
      helpLines.add("options:");
      for (String optionName : actionsAndOptions.optionNames) {
        Option option = actionsAndOptions.getOption(optionName);
        helpLines.addAll(option.getHelpLines());
      }
      helpText = Joiner.on("\n").join(helpLines);
    }
    System.out.println(helpText);
    System.out.println();
View Full Code Here

Examples of com.google.eclipse.protobuf.protobuf.Option

  //
  // service ABC {
  //   option (code) = 68;
  // }
  @Test public void should_support_Service_options() {
    Option option = xtext.find("code", ")", Option.class);
    IScope scope = scopeProvider.scope_OptionSource_target(option.getSource(), reference);
    assertThat(descriptionsIn(scope), containAll("code", "proto.code", "google.proto.code", "com.google.proto.code",
                                                 ".com.google.proto.code",
                                                 "info", "proto.info", "google.proto.info", "com.google.proto.info",
                                                 ".com.google.proto.info"));
  }
View Full Code Here

Examples of com.googlecode.jslint4java.Option

    {
        for (Entry<String, String> entry : options.entrySet()) {
            if (entry.getValue() == null || entry.getValue().equals("")) {
                continue;
            }
            Option option;
            try {
                option = Option.valueOf(entry.getKey().toUpperCase(Locale.ENGLISH));
            } catch (IllegalArgumentException e) {
                throw new MojoExecutionException("unknown option: " + entry.getKey());
            }
View Full Code Here

Examples of com.jetbrains.au.jslintplugin.config.Option

    @NotNull
    public List<Option> getJsLintOptions(){
        List<Option> optionList = new ArrayList<Option>();
        for (String optionName : state.options.keySet()) {
            optionList.add(new Option(JsLintOption.getOptions().get(optionName), state.options.get(optionName)));
        }
        return optionList;
    }
View Full Code Here

Examples of com.mattinsler.guiceymongo.data.generator.option.Option

  }
 
  @Override
  public String getKeyValue() {
    if (super.hasOption("identity")) {
      Option option = super.getOption("identity");
      if (option.getParameters().isEmpty())
        return "_id";
      String value = null;
      for (Map.Entry<String, Object> e : option.getParameters().entrySet()) {
        if ("value".equals(e.getKey()))
          value = e.getValue().toString();
      }
      if (value == null)
        throw new RuntimeException("Problems with the identity option... Can only be [identity] or [identity('key')] or [identity(value='key')]");
View Full Code Here

Examples of com.mks.api.Option

/*
        final CmdRunner runner = session.createCmdRunner();
*/
        Command command = new Command(Command.SI);
        command.setCommandName("viewsandbox");
        command.addOption(new Option("sandbox", sandbox));
        MultiValue mv = new MultiValue( "," );
        mv.add( "name" );
        mv.add( "context" );
        mv.add( "wfdelta" );
        mv.add( "memberrev" );
        mv.add( "workingrev" );
        mv.add( "revsyncdelta" );
        mv.add( "memberarchive" );
        mv.add( "cpid" );
        mv.add("workingcpid");
        command.addOption(new Option("fields", mv));
        command.addOption(new Option("recurse"));
        System.err.println(command.toString());
        final Response response;
        final Set<String> types = new HashSet<String>();
        final Set<String> modeltypes = new HashSet<String>();
        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.