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
|
* @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();
|
ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();
|
||||||
Position position= new Position(0, 0);
|
Position position= new Position(0, 0);
|
||||||
if (false /* delayed - see bug 18316 */) {
|
if (false /* delayed - see bug 18316 */) {
|
||||||
getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
|
getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position);
|
||||||
selectAndReveal(position.getOffset(), position.getLength());
|
selectAndReveal(position.getOffset(), position.getLength());
|
||||||
} else /* no delay - see bug 18316 */ {
|
} 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);
|
setStatusLineErrorMessage(null);
|
||||||
setStatusLineMessage(null);
|
setStatusLineMessage(null);
|
||||||
if (annotation != null) {
|
if (annotation != null) {
|
||||||
|
@ -875,6 +876,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
|
||||||
setStatusLineMessage(annotation.getText());
|
setStatusLineMessage(annotation.getText());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return annotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -951,7 +953,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
|
||||||
* otherwise
|
* otherwise
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
private boolean isNavigationTarget(Annotation annotation) {
|
protected boolean isNavigationTarget(Annotation annotation) {
|
||||||
Preferences preferences= EditorsUI.getPluginPreferences();
|
Preferences preferences= EditorsUI.getPluginPreferences();
|
||||||
AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
|
AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
|
||||||
// See bug 41689
|
// See bug 41689
|
||||||
|
|
Loading…
Add table
Reference in a new issue