Bug 82242 JavaElementImageProvider gives wrong adornments for annotations/enums
I20050104-1600 In general, the JavaElementImageProvider also shows "implicit" element modifiers. Here's an example showing where types and members are missing adornments: class C { } interface MyInt { int X= 12; } @interface MyTag { // missing "default access" adornment int X= 12; // missing "static final" adornment } enum MyEnum { // missing "default access" adornment RED // missing "static final" adornment ; public static final MyEnum ROUGE= RED; }
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
return JavaPluginImages.DESC_OBJS_INNER_CLASS_PROTECTED;
		else
			return JavaPluginImages.DESC_OBJS_INNER_CLASS_DEFAULT;
	}
	
	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;
	}
	
	private static ImageDescriptor getInnerEnumImageDescriptor(boolean isInInterface, int flags) {
		if (Flags.isPublic(flags) || isInInterface)
			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;
	}
	
	private static ImageDescriptor getAnnotationImageDescriptor(int flags) {
		if (Flags.isPublic(flags) || Flags.isProtected(flags) || Flags.isPrivate(flags))
			return JavaPluginImages.DESC_OBJS_ANNOTATION;
		else
			return JavaPluginImages.DESC_OBJS_ANNOTATION_DEFAULT;
	}