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/ErrorTickImageProvider.java
try {
			if (obj instanceof IJavaElement) {
				IJavaElement element= (IJavaElement) obj;
				if (!element.exists()) {
					return 0;
				}
				
				int type= element.getElementType();
				switch (type) {
					case IJavaElement.JAVA_PROJECT:
					case IJavaElement.PACKAGE_FRAGMENT_ROOT:
						return getErrorTicksFromMarkers(element.getCorrespondingResource(), IResource.DEPTH_INFINITE, null);
					case IJavaElement.PACKAGE_FRAGMENT:
					case IJavaElement.CLASS_FILE:
						return getErrorTicksFromMarkers(element.getCorrespondingResource(), IResource.DEPTH_ONE, null);
					case IJavaElement.COMPILATION_UNIT:
					case IJavaElement.PACKAGE_DECLARATION:
					case IJavaElement.IMPORT_DECLARATION:
					case IJavaElement.IMPORT_CONTAINER:
					case IJavaElement.TYPE:
					case IJavaElement.INITIALIZER:
					case IJavaElement.METHOD:
					case IJavaElement.FIELD:
						ICompilationUnit cu= (ICompilationUnit) JavaModelUtil.findElementOfKind(element, IJavaElement.COMPILATION_UNIT);
						if (cu != null && cu.exists()) {
							
							ISourceRange range= ((ISourceReference)element).getSourceRange();
							
							if (cu.isWorkingCopy()) {
								return getErrorTicksFromWorkingCopy((ICompilationUnit) cu.getOriginalElement(), range);