Search in sources :

Example 1 with AnnotationAtttributeProposalInfo

use of org.eclipse.jdt.internal.ui.text.java.AnnotationAtttributeProposalInfo in project che by eclipse.

the class CompletionProposalCollector method createAnnotationAttributeReferenceProposal.

private IJavaCompletionProposal createAnnotationAttributeReferenceProposal(CompletionProposal proposal) {
    StyledString displayString = fLabelProvider.createLabelWithTypeAndDeclaration(proposal);
    ImageDescriptor descriptor = fLabelProvider.createMethodImageDescriptor(proposal);
    String completion = String.valueOf(proposal.getCompletion());
    JavaCompletionProposal javaProposal = new JavaCompletionProposal(completion, proposal.getReplaceStart(), getLength(proposal), getImage(descriptor), displayString, computeRelevance(proposal));
    if (fJavaProject != null)
        javaProposal.setProposalInfo(new AnnotationAtttributeProposalInfo(fJavaProject, proposal));
    return javaProposal;
}
Also used : AnnotationAtttributeProposalInfo(org.eclipse.jdt.internal.ui.text.java.AnnotationAtttributeProposalInfo) ImageDescriptor(org.eclipse.jface.resource.ImageDescriptor) StyledString(org.eclipse.jface.viewers.StyledString) StyledString(org.eclipse.jface.viewers.StyledString) JavaCompletionProposal(org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal) LazyJavaCompletionProposal(org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal)

Aggregations

AnnotationAtttributeProposalInfo (org.eclipse.jdt.internal.ui.text.java.AnnotationAtttributeProposalInfo)1 JavaCompletionProposal (org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal)1 LazyJavaCompletionProposal (org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal)1 ImageDescriptor (org.eclipse.jface.resource.ImageDescriptor)1 StyledString (org.eclipse.jface.viewers.StyledString)1