private IJavaAnnotation getNextAnnotation(int offset, boolean forward, Position annotationPosition) {
private IJavaAnnotation getNextAnnotation(int offset, int length, boolean forward, Position annotationPosition) {
	private IJavaAnnotation getNextAnnotation(int offset, boolean forward, Position annotationPosition) {				IJavaAnnotation nextAnnotation= null;		Position nextAnnotationPosition= null;				IDocument document= getDocumentProvider().getDocument(getEditorInput());		int endOfDocument= document.getLength(); 		int distance= 0;				IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());		Iterator e= new JavaAnnotationIterator(model, true);		while (e.hasNext()) {			IJavaAnnotation a= (IJavaAnnotation) e.next();			Preferences workbenchTextEditorPrefStore= Platform.getPlugin("org.eclipse.ui.workbench.texteditor").getPluginPreferences(); //$NON-NLS-1$			Iterator iter= getAnnotationPreferences().getAnnotationPreferences().iterator();			boolean isNavigationTarget= false;			while (iter.hasNext()) {				AnnotationPreference annotationPref= (AnnotationPreference)iter.next();				if (annotationPref.getAnnotationType().equals(a.getAnnotationType())) {					String key;					if (forward)						key= annotationPref.getIsGoToNextNavigationTargetKey();					else						key= annotationPref.getIsGoToPreviousNavigationTargetKey();					if (key != null)						isNavigationTarget= workbenchTextEditorPrefStore.getBoolean(key);					break;				}				annotationPref= null;			}						if (a.hasOverlay() || !isNavigationTarget)				continue;							Position p= model.getPosition((Annotation) a);			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;				}			}		}				if (nextAnnotationPosition != null) {			annotationPosition.setOffset(nextAnnotationPosition.getOffset());			annotationPosition.setLength(nextAnnotationPosition.getLength());		}				return nextAnnotation;	}