cachedLinePrefix_ = token;
String token = response.getToken();
JsArrayString comp = response.getCompletions();
JsArrayString pkgs = response.getPackages();
JsArrayBoolean quote = response.getQuote();
JsArrayInteger type = response.getType();
ArrayList<QualifiedName> newComp = new ArrayList<QualifiedName>();
// Get function completions from the server
for (int i = 0; i < comp.length(); i++)
if (comp.get(i).endsWith(" = "))
newComp.add(new QualifiedName(comp.get(i), pkgs.get(i), quote.get(i), type.get(i)));
// Try getting our own function argument completions
if (!response.getExcludeOtherCompletions())
{
addFunctionArgumentCompletions(token, newComp);
addScopedArgumentCompletions(token, newComp);
}
// Get variable completions from the current scope
if (!response.getExcludeOtherCompletions())
{
addScopedCompletions(token, newComp, "variable");
addScopedCompletions(token, newComp, "function");
}
// Get other server completions
for (int i = 0; i < comp.length(); i++)
if (!comp.get(i).endsWith(" = "))
newComp.add(new QualifiedName(comp.get(i), pkgs.get(i), quote.get(i), type.get(i)));
CompletionResult result = new CompletionResult(
response.getToken(),
newComp,
response.getGuessedFunctionName(),