Fix issue 2002: dsconfig: don't support the -t option in create-xxx unless it's required
When there is only one possible value for the -t option and that value is "generic" the -t option is hidden, as it only confuses users.
| | |
| | | OPTION_DSCFG_LONG_TYPE, false, false, true, "{TYPE}", GENERIC_TYPE, |
| | | null, MSGID_DSCFG_DESCRIPTION_TYPE_DEFAULT, r.getChildDefinition() |
| | | .getUserFriendlyName(), GENERIC_TYPE, typeUsage); |
| | | |
| | | // Hide the option if it defaults to generic and generic is the |
| | | // only possible value. |
| | | if (types.size() == 1) { |
| | | this.typeArgument.setHidden(true); |
| | | } |
| | | } |
| | | this.subCommand.addArgument(this.typeArgument); |
| | | |