* <code>true</code> if search direction is forward,
* <code>false</code> if backward
*/
- public void gotoAnnotation(boolean forward) {
+ public Annotation gotoAnnotation(boolean forward) {
ITextSelection selection = (ITextSelection) getSelectionProvider().getSelection();
Position position = new Position(0, 0);
+ Annotation annotation=null;
if (false /* delayed - see bug 18316 */) {
- getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+ annotation=getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
selectAndReveal(position.getOffset(), position.getLength());
} else /* no delay - see bug 18316 */{
- Annotation annotation = getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
+ annotation = getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
setStatusLineErrorMessage(null);
setStatusLineMessage(null);
if (annotation != null) {
setStatusLineMessage(annotation.getText());
}
}
+ return annotation;
}
/**
* otherwise
* @since 3.0
*/
- private boolean isNavigationTarget(Annotation annotation) {
+ protected boolean isNavigationTarget(Annotation annotation) {
Preferences preferences = EditorsUI.getPluginPreferences();
AnnotationPreference preference = getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
// See bug 41689