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:
parent
0b03dd0034
commit
28de4d648c
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue