Bug 44362 [painting] Should not search for occurrences if element under cursor is the same
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
return Status.CANCEL_STATUS;
			IDocumentProvider documentProvider= getDocumentProvider();
			if (documentProvider == null)
				return Status.CANCEL_STATUS;
			IAnnotationModel annotationModel= documentProvider.getAnnotationModel(getEditorInput());
			if (annotationModel == null)
				return Status.CANCEL_STATUS;
			
			int length= fPositions.length;
			Map annotationMap= new HashMap(length);
			for (int i= 0; i < length; i++) {
				if (isCanceled())
					return Status.CANCEL_STATUS;
				String message;
				Position position= fPositions[i];
				
				try {
					message= document.get(position.offset, position.length);
				} catch (BadLocationException ex) {
					
					continue;
				}
				annotationMap.put(
						new Annotation("org.eclipse.jdt.ui.occurrences", false, message), 
						position);
			}
			if (isCanceled())
				return Status.CANCEL_STATUS;
			synchronized (getLockObject(annotationModel)) {
				if (annotationModel instanceof IAnnotationModelExtension) {