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
if (Flags.isDeprecated(modifiers))
					flags |= JavaElementImageDescriptor.DEPRECATED;
				
				if (member.getElementType() == IJavaElement.TYPE) {
					if (JavaModelUtil.hasMainMethod((IType) member)) {
						flags |= JavaElementImageDescriptor.RUNNABLE;
					}
				}
			} catch (JavaModelException e) {
				
			}
		}
		return flags;
	}
		
	private static boolean confirmAbstract(IMember element) throws JavaModelException {
		
		if (element.getElementType() == IJavaElement.TYPE) {
			return ((IType) element).isClass();
		}
		return element.getDeclaringType().isClass();
	}
	
	private static boolean isInterfaceField(IMember element) throws JavaModelException {
		
		if (element.getElementType() == IJavaElement.FIELD) {
			return element.getDeclaringType().isInterface();
		}
		return false;
	}