CodeCompletionProposal[] proposals = processor.computeCompletionProposals(
processor.getModel().newIvyFile(
projectName, doc.getText(0, doc.getLength()), caretOffset),
caretOffset);
for (int i = 0; i < proposals.length; i++) {
CodeCompletionProposal proposal = proposals[i];
resultSet.addItem(new IvyCompletionItem(
proposal.getReplacementOffset(),
proposal.getReplacementString(),
proposal.getCursorPosition()));
}
} catch (BadLocationException e) {
} finally {
resultSet.finish();
}