1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Changed the interfaces on the CEditor so that it works for both 3.1.x and 3.2.

This commit is contained in:
Doug Schaefer 2005-11-18 16:06:53 +00:00
parent 0b03dd0034
commit 28de4d648c

View file

@ -859,14 +859,15 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
*
* @param forward <code>true</code> if search direction is forward, <code>false</code> if backward
*/
public void gotoAnnotation(boolean forward) {
public Annotation gotoAnnotation(boolean forward) {
Annotation annotation = null;
ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();
Position position= new Position(0, 0);
if (false /* delayed - see bug 18316 */) {
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) {
@ -875,6 +876,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
setStatusLineMessage(annotation.getText());
}
}
return annotation;
}
/**
@ -951,7 +953,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
* 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