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/MemberFilter.java
/*
	 * @see ViewerFilter#isFilterProperty(java.lang.Object, java.lang.String)
	 */
	public boolean isFilterProperty(Object element, Object property) {
		return false;
	}
	/*
	 * @see ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
	 */		
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		try {
			if (element instanceof IMember) {
				IMember member= (IMember) element;
				int memberType= member.getElementType();
				
				if (hasFilter(FILTER_FIELDS) && memberType == IJavaElement.FIELD) {
					return false;
				}
				if (hasFilter(FILTER_LOCALTYPES) && memberType == IJavaElement.TYPE && isLocalType((IType) member)) {
					return false;
				}
				
				if (member.getElementName().startsWith("<")) { 
					return false;
				}
				int flags= member.getFlags();
				if (hasFilter(FILTER_STATIC) && (Flags.isStatic(flags) || isFieldInInterface(member)) && memberType != IJavaElement.TYPE) {
					return false;
				}