use of org.eclipse.jdt.internal.ui.text.java.MethodProposalInfo in project che by eclipse.
the class CompletionProposalCollector method createMethodDeclarationProposal.
private IJavaCompletionProposal createMethodDeclarationProposal(CompletionProposal proposal) {
if (fCompilationUnit == null || fJavaProject == null)
return null;
String name = String.valueOf(proposal.getName());
String[] paramTypes = Signature.getParameterTypes(String.valueOf(proposal.getSignature()));
for (int index = 0; index < paramTypes.length; index++) paramTypes[index] = Signature.toString(paramTypes[index]);
int start = proposal.getReplaceStart();
int length = getLength(proposal);
StyledString label = fLabelProvider.createOverrideMethodProposalLabel(proposal);
JavaCompletionProposal javaProposal = new OverrideCompletionProposal(fJavaProject, fCompilationUnit, name, paramTypes, start, length, label, String.valueOf(proposal.getCompletion()));
javaProposal.setImage(getImage(fLabelProvider.createMethodImageDescriptor(proposal)));
javaProposal.setProposalInfo(new MethodProposalInfo(fJavaProject, proposal));
javaProposal.setRelevance(computeRelevance(proposal));
fSuggestedMethodNames.add(new String(name));
return javaProposal;
}
Aggregations