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
if (hasFilter(FILTER_NONPUBLIC) && !Flags.isPublic(flags) && !isMemberInInterface(member) && !isTopLevelType(member)) {
					return false;
				}
			}			
		} catch (JavaModelException e) {
			
		}
		return true;
	}
	
	private boolean isLocalType(IType type) {
		IJavaElement parent= type.getParent();
		return parent instanceof IMember && !(parent instanceof IType);
	}
	
	private boolean isMemberInInterface(IMember member) throws JavaModelException {
		IType parent= member.getDeclaringType();
		return parent != null && parent.isInterface();
	}
	
	private boolean isFieldInInterface(IMember member) throws JavaModelException {
		return (member.getElementType() == IJavaElement.FIELD) && member.getDeclaringType().isInterface();
	}	
	
	private boolean isTopLevelType(IMember member) {
		IType parent= member.getDeclaringType();
		return parent == null;
	}		
}