if(results.size() > 0) {
filter = completionResults.getFilter();
}
Iterator<CompilerCodeCompletionResult> iterator = results.iterator();
while(iterator.hasNext()) {
CompilerCodeCompletionResult next = iterator.next();
QuorumCompletionItem res = new QuorumCompletionItem();
res.setIsBaseClassMethod(next.isBaseClassMethod());
res.setType(next.getType());
res.setCaretOffset(caretOffset);
res.setDotOffset(caretOffset - filter.length());
res.setDocumentationText(next.getDocumentation());
res.setCompletionText(next.getCompletion());
res.setDisplayText(next.getDisplayName());
res.setRightDisplayText(next.getDisplayType());
if(!next.getDisplayName().equals("") && next.getDisplayName().startsWith(filter)) {
completionResultSet.addItem(res);
}
}
}