|
From: Kyle S. <kyl...@us...> - 2006-04-08 05:40:10
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8580/src/org/rubypeople/rdt/internal/ui/rubyeditor Modified Files: RubyEditor.java Log Message: Fixed to be compatible with Eclipse 3.2 AbstractDecoratedTextEditor on: gotoAnnotation - Modified to return Annotation type isNavigationTarget - changed to protected Index: RubyEditor.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/ui/rubyeditor/RubyEditor.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** RubyEditor.java 7 Apr 2006 21:23:55 -0000 1.40 --- RubyEditor.java 8 Apr 2006 05:40:06 -0000 1.41 *************** *** 357,366 **** * "Go to Next/Previous Annotation" actions * * @param annotation the annotation * @return <code>true</code> if this is a target, <code>false</code> * otherwise ! * @since 3.0 */ ! private boolean isNavigationTarget(Annotation annotation) { Preferences preferences= EditorsUI.getPluginPreferences(); AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(annotation); --- 357,369 ---- * "Go to Next/Previous Annotation" actions * + * CHANGED TO WORK WITH 3.2 (Non-breaking in 3.1) + * Method couldn't be restricted to private, changed to protected + * * @param annotation the annotation * @return <code>true</code> if this is a target, <code>false</code> * otherwise ! * @since 3.2 */ ! protected boolean isNavigationTarget(Annotation annotation) { Preferences preferences= EditorsUI.getPluginPreferences(); AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(annotation); *************** *** 376,382 **** * Next/Previous tool bar drop down menu and if it is checked. * * @param forward <code>true</code> if search direction is forward, <code>false</code> if backward */ ! public void gotoAnnotation(boolean forward) { ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection(); Position position= new Position(0, 0); --- 379,390 ---- * Next/Previous tool bar drop down menu and if it is checked. * + * CHANGED TO WORK WITH 3.2 (Non-breaking in 3.1) + * Annotation type must be returned + * * @param forward <code>true</code> if search direction is forward, <code>false</code> if backward + * @since 3.2 */ ! public Annotation gotoAnnotation(boolean forward) { ! Annotation annotation = null; ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection(); Position position= new Position(0, 0); *************** *** 385,389 **** selectAndReveal(position.getOffset(), position.getLength()); } else /* no delay - see bug 18316 */ { ! Annotation annotation= getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position); setStatusLineErrorMessage(null); setStatusLineMessage(null); --- 393,397 ---- selectAndReveal(position.getOffset(), position.getLength()); } else /* no delay - see bug 18316 */ { ! annotation= getNextAnnotation(selection.getOffset(), selection.getLength(), forward, position); setStatusLineErrorMessage(null); setStatusLineMessage(null); *************** *** 394,397 **** --- 402,406 ---- } } + return annotation; } |