getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
}
else /* no delay - see bug 18316 */{
Annotation annotation = getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
IEditorStatusLine editorStatusLine = (IEditorStatusLine) getTextEditor().getAdapter(IEditorStatusLine.class);
if (editorStatusLine != null) {
editorStatusLine.setMessage(true, null, null);
editorStatusLine.setMessage(false, null, null);
}
else {
IStatusLineManager mgr = getStatusLineManager();
if (mgr != null) {
mgr.setErrorMessage(null);
mgr.setMessage(null, null);
}
}
if (annotation != null) {
updateAnnotationViews(annotation);
if (_debug) {
System.out.println("select and reveal " + annotation.getType() + "@" + position.getOffset() + ":" + position.getLength()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
getTextEditor().selectAndReveal(position.getOffset(), position.getLength());
if (editorStatusLine != null) {
editorStatusLine.setMessage(true, null, null);
editorStatusLine.setMessage(false, annotation.getText(), null);
}
else {
IStatusLineManager mgr = getStatusLineManager();
if (mgr != null) {
mgr.setErrorMessage(null);