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

The following examples show how to use org.eclipse.jdt.internal.ui.JavaPluginImages#DESC_OBJS_ENUM . 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: BindingLabelProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
private static ImageDescriptor getTypeImageDescriptor(boolean inner, ITypeBinding binding, int flags) {
	if (binding.isEnum())
		return JavaPluginImages.DESC_OBJS_ENUM;
	else if (binding.isAnnotation())
		return JavaPluginImages.DESC_OBJS_ANNOTATION;
	else if (binding.isInterface()) {
		if ((flags & JavaElementImageProvider.LIGHT_TYPE_ICONS) != 0)
			return JavaPluginImages.DESC_OBJS_INTERFACEALT;
		if (inner)
			return getInnerInterfaceImageDescriptor(binding.getModifiers());
		return getInterfaceImageDescriptor(binding.getModifiers());
	} else if (binding.isClass()) {
		if ((flags & JavaElementImageProvider.LIGHT_TYPE_ICONS) != 0)
			return JavaPluginImages.DESC_OBJS_CLASSALT;
		if (inner)
			return getInnerClassImageDescriptor(binding.getModifiers());
		return getClassImageDescriptor(binding.getModifiers());
	} else if (binding.isTypeVariable()) {
		return JavaPluginImages.DESC_OBJS_TYPEVARIABLE;
	}
	// primitive type, wildcard
	return null;
}
 
Example 2
Source File: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private static ImageDescriptor getInnerEnumImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
	if (Flags.isPublic(flags) || isInInterfaceOrAnnotation)
		return JavaPluginImages.DESC_OBJS_ENUM;
	else if (Flags.isPrivate(flags))
		return JavaPluginImages.DESC_OBJS_ENUM_PRIVATE;
	else if (Flags.isProtected(flags))
		return JavaPluginImages.DESC_OBJS_ENUM_PROTECTED;
	else
		return JavaPluginImages.DESC_OBJS_ENUM_DEFAULT;
}
 
Example 3
Source File: JavaElementImageProvider.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private static ImageDescriptor getEnumImageDescriptor(int flags) {
	if (Flags.isPublic(flags) || Flags.isProtected(flags) || Flags.isPrivate(flags))
		return JavaPluginImages.DESC_OBJS_ENUM;
	else
		return JavaPluginImages.DESC_OBJS_ENUM_DEFAULT;
}
 
Example 4
Source File: JavaCompareUtilities.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
static ImageDescriptor getEnumImageDescriptor() {
	return JavaPluginImages.DESC_OBJS_ENUM;
}