return ExplicitAction.DEFAULT;
}
JsonArray<Token> tokens = parseResult.getTokens();
Preconditions.checkNotNull(tokens);
Preconditions.checkState(tokens.size() > 0);
CssToken lastToken = (CssToken) tokens.peek();
if ("{".equals(lastToken.getContext())) {
return ExplicitAction.DEFAULT;
}
// 2) Check we will enter block.
parseResult = parser.getState(CssState.class, selectionModel.getCursorPosition(), "{");
if (parseResult == null) {
return ExplicitAction.DEFAULT;
}
tokens = parseResult.getTokens();
Preconditions.checkNotNull(tokens);
Preconditions.checkState(tokens.size() > 0);
lastToken = (CssToken) tokens.peek();
String context = lastToken.getContext();
boolean inBlock = context != null && context.endsWith("{");
if (inBlock && NULL == lastToken.getType()) {
return new ExplicitAction(
new DefaultAutocompleteResult(CLASS_SEPARATOR, "", CLASS_JUMPLENGTH));
}
return ExplicitAction.DEFAULT;
}