1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / phpeditor / BasicJavaEditorActionContributor.java
index 5048803..ebbc553 100644 (file)
@@ -28,7 +28,9 @@ import org.eclipse.ui.IWorkbenchActionConstants;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.actions.RetargetAction;
 import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
+import org.eclipse.ui.texteditor.GotoAnnotationAction;
 import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
 import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
 import org.eclipse.ui.texteditor.RetargetTextEditorAction;
 
@@ -42,8 +44,8 @@ public class BasicJavaEditorActionContributor extends
 
        private TogglePresentationAction fTogglePresentation;
 
-       // private GotoAnnotationAction fPreviousAnnotation;
-       // private GotoAnnotationAction fNextAnnotation;
+       private GotoAnnotationAction fPreviousAnnotation;
+       private GotoAnnotationAction fNextAnnotation;
 
        private RetargetTextEditorAction fGotoMatchingBracket;
 
@@ -81,11 +83,10 @@ public class BasicJavaEditorActionContributor extends
                // belonging to the active editor
                fTogglePresentation = new TogglePresentationAction();
 
-               // fPreviousAnnotation= new GotoAnnotationAction("PreviousAnnotation.",
-               // false); //$NON-NLS-1$
-               //
-               // fNextAnnotation= new GotoAnnotationAction("NextAnnotation.", true);
-               // //$NON-NLS-1$
+               fPreviousAnnotation = new GotoAnnotationAction(b,
+                               "PreviousAnnotation.", null, false); //$NON-NLS-1$
+               fNextAnnotation = new GotoAnnotationAction(b,
+                               "NextAnnotation.", null, true); //$NON-NLS-1$
 
                fGotoMatchingBracket = new RetargetTextEditorAction(b,
                                "GotoMatchingBracket."); //$NON-NLS-1$
@@ -153,14 +154,10 @@ public class BasicJavaEditorActionContributor extends
                super.init(bars, page);
 
                // register actions that have a dynamic editor.
-               // bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION,
-               // fNextAnnotation);
-               // bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION,
-               // fPreviousAnnotation);
-               // bars.setGlobalActionHandler(ITextEditorActionConstants.NEXT,
-               // fNextAnnotation);
-               // bars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS,
-               // fPreviousAnnotation);
+               bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, fNextAnnotation);
+               bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, fPreviousAnnotation);
+               bars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, fNextAnnotation);
+               bars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, fPreviousAnnotation);
                bars
                                .setGlobalActionHandler(
                                                ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY,
@@ -234,8 +231,8 @@ public class BasicJavaEditorActionContributor extends
                        textEditor = (ITextEditor) part;
 
                fTogglePresentation.setEditor(textEditor);
-               // fPreviousAnnotation.setEditor(textEditor);
-               // fNextAnnotation.setEditor(textEditor);
+               fPreviousAnnotation.setEditor(textEditor);
+               fNextAnnotation.setEditor(textEditor);
 
                fGotoMatchingBracket.setAction(getAction(textEditor,
                                GotoMatchingBracketAction.GOTO_MATCHING_BRACKET));