IJavaAnnotation nextAnnotation= getNextAnnotation(s.getOffset(), forward, annotationPosition);
IJavaAnnotation nextAnnotation= getNextAnnotation(s.getOffset(), s.getLength(),forward, annotationPosition);
	public void gotoAnnotation(boolean forward) {				ISelectionProvider provider= getSelectionProvider();				ITextSelection s= (ITextSelection) provider.getSelection();		Position annotationPosition= new Position(0, 0);		IJavaAnnotation nextAnnotation= getNextAnnotation(s.getOffset(), forward, annotationPosition);				setStatusLineErrorMessage(null);		if (nextAnnotation != null) {						IMarker marker= null;			if (nextAnnotation instanceof MarkerAnnotation)				marker= ((MarkerAnnotation) nextAnnotation).getMarker();			else {				Iterator e= nextAnnotation.getOverlaidIterator();				if (e != null) {					while (e.hasNext()) {						Object o= e.next();						if (o instanceof MarkerAnnotation) {							marker= ((MarkerAnnotation) o).getMarker();							break;						}					}				}			}						if (marker != null) {				IWorkbenchPage page= getSite().getPage();				IViewPart view= view= page.findView("org.eclipse.ui.views.TaskList"); //$NON-NLS-1$				if (view instanceof TaskList) {					StructuredSelection ss= new StructuredSelection(marker);					((TaskList) view).setSelection(ss, true);				}			}						selectAndReveal(annotationPosition.getOffset(), annotationPosition.getLength());			if (nextAnnotation.isProblem())				setStatusLineErrorMessage(nextAnnotation.getMessage());		}	}