Java Code Examples for org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_MISC_PUBLIC

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_MISC_PUBLIC . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MethodDeclarationCompletionProposal.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public MethodDeclarationCompletionProposal(IType type, String methodName, String returnTypeSig, int start, int length, int relevance) {
	super("", type.getCompilationUnit(), start, length, null, getDisplayName(methodName, returnTypeSig), relevance); //$NON-NLS-1$
	Assert.isNotNull(type);
	Assert.isNotNull(methodName);

	fType= type;
	fMethodName= methodName;
	fReturnTypeSig= returnTypeSig;

	if (returnTypeSig == null) {
		setProposalInfo(new ProposalInfo(type));

		ImageDescriptor desc= new JavaElementImageDescriptor(JavaPluginImages.DESC_MISC_PUBLIC, JavaElementImageDescriptor.CONSTRUCTOR, JavaElementImageProvider.SMALL_SIZE);
		setImage(JavaPlugin.getImageDescriptorRegistry().get(desc));
	} else {
		setImage(JavaPluginImages.get(JavaPluginImages.IMG_MISC_PRIVATE));
	}
}
 
Example 2
Source File: BindingLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private static ImageDescriptor getMethodImageDescriptor(int modifiers) {
	if (Modifier.isPublic(modifiers))
		return JavaPluginImages.DESC_MISC_PUBLIC;
	if (Modifier.isProtected(modifiers))
		return JavaPluginImages.DESC_MISC_PROTECTED;
	if (Modifier.isPrivate(modifiers))
		return JavaPluginImages.DESC_MISC_PRIVATE;

	return JavaPluginImages.DESC_MISC_DEFAULT;
}
 
Example 3
Source File: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static ImageDescriptor getMethodImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
	if (Flags.isPublic(flags) || isInInterfaceOrAnnotation)
		return JavaPluginImages.DESC_MISC_PUBLIC;
	if (Flags.isProtected(flags))
		return JavaPluginImages.DESC_MISC_PROTECTED;
	if (Flags.isPrivate(flags))
		return JavaPluginImages.DESC_MISC_PRIVATE;

	return JavaPluginImages.DESC_MISC_DEFAULT;
}