}
@Override
public boolean canAppearNext(CommandContext ctx) throws CommandFormatException {
ParsedCommandLine args = ctx.getParsedCommandLine();
if (exclusive) {
final Set<String> propertyNames = args.getPropertyNames();
if(propertyNames.isEmpty()) {
final List<String> values = args.getOtherProperties();
if(values.isEmpty()) {
return true;
}
if(index == -1) {
return false;
}
return !(index == 0 && values.size() == 1);
}
if(propertyNames.size() != 1) {
return false;
}
if(args.getLastParsedPropertyName() == null) {
return false;
}
final List<String> values = args.getOtherProperties();
if(!values.isEmpty()) {
return false;
}
return fullName.startsWith(args.getLastParsedPropertyName()) || (shortName != null && shortName.startsWith(args.getLastParsedPropertyName()));
}
if (isPresent(args)) {
return !isValueComplete(args);
}