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 (descriptor != null) {
			return fRegistry.get(descriptor);
		}
		return null;
	}
	
	private boolean showOverlayIcons(int flags) {
		return (flags & OVERLAY_ICONS) != 0;
	}
	
	private boolean useLightIcons(int flags) {
		return (flags & LIGHT_TYPE_ICONS) != 0;
	}
	
	private boolean useSmallSize(int flags) {
		return (flags & SMALL_ICONS) != 0;
	}		
	/**
	 * Returns an image descriptor for a java element. The descriptor includes overlays, if specified.
	 */
	public ImageDescriptor getJavaImageDescriptor(IJavaElement element, int flags) {
		int adornmentFlags= showOverlayIcons(flags) ? computeAdornmentFlags(element) : 0;
		Point size= useSmallSize(flags) ? SMALL_SIZE : BIG_SIZE;
		return new JavaElementImageDescriptor(getBaseImageDescriptor(element, flags), adornmentFlags, size);
	}
	/**
	 * Returns an image descriptor for a IAdaptable. The descriptor includes overlays, if specified (only error ticks apply).
	 * Returns <code>null</code> if no image could be found.
	 */