Bug 42605 [hovering] NPE in AnnotationHover
Win2K, Build 200308281813, J2RE 1.3.1 IBM J9 build 20030702 (JIT enabled) This appeared in my DOS console - not sure when. There was nothing in the .log file for my workspace. java.lang.NullPointerException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.NullPointerException.<init>(NullPointerException.java:63) at org.eclipse.jdt.internal.ui.text.java.hover.AnnotationHover.getHoverI nfo(AnnotationHover.java:78) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverIn fo(BestMatchHover.java) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy. getHoverInfo(JavaEditorTextHoverProxy.java:69) at org.eclipse.jface.text.TextViewerHoverManager$2.run(TextViewerHoverMa nager.java)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/hover/AnnotationHover.java
* @see IJavaEditorTextHover#setEditor(IEditorPart)
	 */
	public void setEditor(IEditorPart editor) {
		if (editor instanceof CompilationUnitEditor)
			super.setEditor(editor);
		else
			super.setEditor(null);
	}
	/**
	 * Returns the annotation preference for the given marker.
	 * 
	 * @param marker
	 * @return the annotation preference or <code>null</code> if none
	 */	
	private AnnotationPreference getAnnotationPreference(IAnnotationExtension annotation) {
		String markerType= annotation.getMarkerType();
		int severity= annotation.getSeverity();		
		Iterator e= fMarkerAnnotationPreferences.getAnnotationPreferences().iterator();
		while (e.hasNext()) {
			AnnotationPreference info= (AnnotationPreference) e.next();
			if (info.getMarkerType().equals(markerType) && severity == info.getSeverity())
				return info;
			}
		return null;
	}
	static boolean isJavaProblemHover(String id) {
		return PreferenceConstants.ID_PROBLEM_HOVER.equals(id);
	}
}