private static void appendOptions(StringBuffer buffer, CommandTarget commandTarget) { List<Option> optionalOptions = new ArrayList<Option>(); for (Option option : commandTarget.getOptionParser().getOptions()) { if (option.isRequired()) { appendRequiredOption(buffer,option); } else { optionalOptions.add(option); } } for (Option option : optionalOptions) { appendOption(buffer, option); } }
if (option.isRequired()) { buffer.append(" " + SyntaxConstants.LONG_OPTION_SPECIFIER + option.getLongOption());
if (option.isRequired()) { buffer.append(" " + SyntaxConstants.LONG_OPTION_SPECIFIER + option.getLongOption());
if (option.isRequired()) { buffer.append(" " + SyntaxConstants.LONG_OPTION_SPECIFIER + option.getLongOption()); null)); optionNode.addChild(new DataNode(REQUIRED_SUB_NAME+((option.isRequired()) ? TRUE_TOKEN : FALSE_TOKEN), null)); if (option.getSpecifiedDefaultValue() != null
if (option.isRequired()) { mandatoryOptions.add(option); } else {
if (option.isRequired()) { mandatoryOptions.add(option); } else {
if (!opt.equals(cmd.leadOption)) { Option option = getOption(commandTarget, opt); if (option.isRequired()) { appendRequiredOption(sb, option); } else null)); optionNode.addChild(new DataNode(REQUIRED_SUB_NAME+((option.isRequired()) ? TRUE_TOKEN : FALSE_TOKEN), null)); if (option.getSpecifiedDefaultValue() != null
private void addJoptOptionObject(Option option) { OptionSpecBuilder optionBuilder = null; optionBuilder = parser.acceptsAll(option.getAggregate(), option.getHelp()); /* Now set the the attributes related to the option */ ArgumentAcceptingOptionSpec<String> argumentSpecs = null; if (option.isWithRequiredArgs()) { argumentSpecs = optionBuilder.withRequiredArg(); } else { argumentSpecs = optionBuilder.withOptionalArg(); } if (option.isRequired()) { argumentSpecs.required(); } if (option.getValueSeparator() != null) { argumentSpecs.withValuesSeparatedBy(option.getValueSeparator()); } }
private void addJoptOptionObject(Option option) { OptionSpecBuilder optionBuilder = null; optionBuilder = parser.acceptsAll(option.getAggregate(), option.getHelp()); /* Now set the the attributes related to the option */ ArgumentAcceptingOptionSpec<String> argumentSpecs = null; if (option.isWithRequiredArgs()) { argumentSpecs = optionBuilder.withRequiredArg(); } else { argumentSpecs = optionBuilder.withOptionalArg(); } if (option.isRequired()) { argumentSpecs.required(); } if (option.getValueSeparator() != null) { argumentSpecs.withValuesSeparatedBy(option.getValueSeparator()); } }
if (option.isRequired()) { handleCondition( CliStrings.format(CliStrings.GFSHPARSER__MSG__COMMAND_OPTION_0_IS_REQUIRED_USE_HELP,
if (option.isRequired()) { handleCondition(CliStrings.format(CliStrings.GFSHPARSER__MSG__COMMAND_OPTION_0_IS_REQUIRED_USE_HELP, option.getLongOption()), CommandProcessingException.REQUIRED_OPTION_MISSING, option.getLongOption()); logWrapper.fine("Required Parameter " + option.getLongOption());