Bug 6299 JavaWorkbenchAdapter does not provide images
org.eclipse.jdt.internal.ui.JavaWorkbenchAdapter#getImageDescriptor returns null; not very nice when presenting in a viewer. Solution (just suggestion;): org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider#getImageDescriptor ... org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider imageProvider; ... return imageProvider.getImageDescriptor((IJavaElement)element, JavaElementImageProvider.SMALL_ICONS);
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementImageProvider.java
if (Flags.isAbstract(modifiers) && confirmAbstract((IMember) sourceReference))
				flags |= JavaElementImageDescriptor.ABSTRACT;
			if (Flags.isFinal(modifiers))
				flags |= JavaElementImageDescriptor.FINAL;
			if (Flags.isSynchronized(modifiers) && confirmSynchronized((IMember) sourceReference))
				flags |= JavaElementImageDescriptor.SYNCHRONIZED;
			if (Flags.isStatic(modifiers))
				flags |= JavaElementImageDescriptor.STATIC;
				
			if (sourceReference instanceof IType) {
				try {
					if (JavaModelUtil.hasMainMethod((IType)sourceReference))
						flags |= JavaElementImageDescriptor.RUNNABLE;
				} catch (JavaModelException e) {
					
				}
			}
		}
		return flags;
	}
	
	protected int computeExtraAdornmentFlags(Object element) {
		return 0;
	}	
	
	private boolean confirmAbstract(IMember member) {
		  
		 
		IType t= member.getDeclaringType();
		if (t == null && member instanceof IType)