nextChar == -1 || nextChar == ' ' || nextChar == ',' || nextChar == ';' || nextChar == '\n';
// TODO: Check if user has just fixed pairing?
if (context != IN_STRING) {
if ('(' == key && canPairParenthesis) {
return new ExplicitAction(new DefaultAutocompleteResult("()", "", 1));
} else if ('[' == key && canPairParenthesis) {
return new ExplicitAction(new DefaultAutocompleteResult("[]", "", 1));
} else if ('{' == key && canPairParenthesis) {
return new ExplicitAction(new DefaultAutocompleteResult("{}", "", 1));
} else if ('"' == key || '\'' == key) {
String doubleQuote = key + "" + key;
if (!textBeforePosition(selectionRange[0]).endsWith(doubleQuote)) {
return new ExplicitAction(new DefaultAutocompleteResult(doubleQuote, "", 1));
}
} else if (!selection.hasSelection() && (key == nextChar)
&& (']' == key || ')' == key || '}' == key)) {
// Testing what is more useful: pasting or passing.
JsonArray<Token> tokens = parser.parseLineSync(selectionRange[0].getLine());