use of org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider in project Pydev by fabioz.
the class JavaElementToken method getImage.
@Override
public IImageHandle getImage() {
if (this.image != null) {
return this.image;
}
CompletionProposalLabelProvider provider = new CompletionProposalLabelProvider();
CompletionProposal generatedProposal = CompletionProposal.create(completionProposalKind, 0);
generatedProposal.setFlags(completionProposalFlags);
if (HAS_ADDITIONAL_FLAGS) {
generatedProposal.setAdditionalFlags(completionProposalAdditionalFlags);
}
generatedProposal.setDeclarationSignature(completionPropsoalSignature);
generatedProposal.setSignature(completionPropsoalSignature);
// uses: kind, flags, signature to create an image.
ImageDescriptor descriptor = provider.createImageDescriptor(generatedProposal);
Image computed = descriptor.createImage();
return new IImageHandle() {
@Override
public Object getImageData() {
return computed.getImageData();
}
@Override
public Object getImage() {
return computed;
}
};
}
Aggregations