Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
LANG: minor refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-medeiros committed Apr 14, 2015
1 parent 2f5024d commit 119c6e3
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,21 @@ protected List<ICompletionProposal> computeProposals(LangContentAssistInvocation

ArrayList2<ICompletionProposal> proposals = new ArrayList2<>();
for (ToolCompletionProposal proposal : resultProposals) {
proposals.add(new CompletionProposal(
proposal.getReplaceString(),
proposal.getReplaceStart(),
proposal.getReplaceLength(),
proposal.getReplaceString().length()
));
proposals.add(adaptToolProposal(proposal));
}

return proposals;
}

protected ICompletionProposal adaptToolProposal(ToolCompletionProposal proposal) {
return new CompletionProposal(
proposal.getReplaceString(),
proposal.getReplaceStart(),
proposal.getReplaceLength(),
proposal.getReplaceString().length()
);
}

protected abstract LangCompletionResult doComputeProposals(LangContentAssistInvocationContext context,
int offset, TimeoutProgressMonitor pm) throws CoreException, CommonException, OperationCancellation;

Expand Down

0 comments on commit 119c6e3

Please sign in to comment.