Bug 46394 RCP: Add marker action disabled for Java editor
N20031111 Start fresh workspace and create a class in a Java project. The following actions are disabled: Edit > Add Bookmark... Edit > Add Task... It works in the standard text editor.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
if ((a instanceof IJavaAnnotation) && ((IJavaAnnotation)a).hasOverlay() || !isNavigationTarget)
				continue;
				
			Position p= model.getPosition(a);
			if (p == null)
				continue;
			
			if (!(p.includes(offset) || (p.getLength() == 0 && offset == p.offset))) {
				
				int currentDistance= 0;
				
				if (forward) {
					currentDistance= p.getOffset() - offset;
					if (currentDistance < 0)
						currentDistance= endOfDocument - offset + p.getOffset();
				} else {
					currentDistance= offset - p.getOffset();
					if (currentDistance < 0)
						currentDistance= offset + endOfDocument - p.getOffset();
				}						
										
				if (nextAnnotation == null || currentDistance < distance) {
					distance= currentDistance;
					nextAnnotation= a;
					nextAnnotationPosition= p;
				}
			} else {
				if (containingAnnotationPosition == null || containingAnnotationPosition.length > p.length) {
					containingAnnotation= a;