logger.trace("Buffer: {}, cursor: {}", buffer, cursor);
logger.trace("Candidates {}", candidates);
}
if (StringUtils.isNotBlank(buffer)) {
// User is typing a command
StrTokenizer strTokenizer = new StrTokenizer(buffer);
String action = strTokenizer.next();
Collection<String> arguments = argumentMap.get(action);
if (arguments != null) {
if (logger.isTraceEnabled()) {
logger.trace("Arguments found for {}, Tokens: {}", action, strTokenizer.getTokenList());
logger.trace("Arguments for {}: {}", action, arguments);
}
List<String> args = new ArrayList<String>(arguments);
List<Completer> completers = new ArrayList<Completer>();
for (String token : strTokenizer.getTokenList()) {
boolean argContains = arguments.contains(token);
if (token.startsWith("-") && !argContains) {
continue;
}
if (argContains) {