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
private static final Point SMALL_SIZE= new Point(16, 16);
	private static final Point BIG_SIZE= new Point(22, 16);
	private static ImageDescriptor DESC_OBJ_PROJECT_CLOSED;	
	private static ImageDescriptor DESC_OBJ_PROJECT;	
	private static ImageDescriptor DESC_OBJ_FOLDER;
	{
		ISharedImages images= JavaPlugin.getDefault().getWorkbench().getSharedImages(); 
		DESC_OBJ_PROJECT_CLOSED= images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT_CLOSED);
		DESC_OBJ_PROJECT= 		 images.getImageDescriptor(ISharedImages.IMG_OBJ_PROJECT);
		DESC_OBJ_FOLDER= 		 images.getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER);
	}
	
	private ImageDescriptorRegistry fRegistry;
		
	public JavaElementImageProvider() {
		fRegistry= JavaPlugin.getImageDescriptorRegistry();
	}
			
	/**
	 * Returns the icon for a given element. The icon depends on the element type
	 * and element properties. If configured, overlay icons are constructed for
	 * <code>ISourceReference</code>s.
	 * @param flags Flags as defined by the JavaImageLabelProvider
	 */
	public Image getImageLabel(Object element, int flags) {
		ImageDescriptor descriptor= null;
		if (element instanceof IJavaElement) {
			descriptor= getJavaImageDescriptor((IJavaElement) element, flags);
		} else if (element instanceof IAdaptable) {
			descriptor= getWorkbenchImageDescriptor((IAdaptable) element, flags);