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
}
				}
			}			
		}
		return info;
	}
	
	private boolean isMarkerInRange(IMarker marker, ISourceRange range) throws CoreException {
		if (marker.isSubtypeOf(IMarker.TEXT)) {
			int pos= marker.getAttribute(IMarker.CHAR_START, -1);
			int offset= range.getOffset();
			return (offset <= pos && offset + range.getLength() > pos);
		}
		return false;
	}
	
	
	private int getErrorTicksFromWorkingCopy(ICompilationUnit original, ISourceRange range) throws CoreException {
		int info= 0;
		if (!original.exists()) {
			return 0;
		}
		
		FileEditorInput editorInput= new FileEditorInput((IFile) original.getCorrespondingResource());
		IAnnotationModel model= JavaPlugin.getDefault().getCompilationUnitDocumentProvider().getAnnotationModel(editorInput);
		if (model != null) {
			Iterator iter= model.getAnnotationIterator();
			while ((info != ERRORTICK_ERROR) && iter.hasNext()) {
				Annotation curr= (Annotation) iter.next();
				IMarker marker= isAnnotationInRange(model, curr, range);