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;
private TogglePresentationAction fTogglePresentation;
- // private GotoAnnotationAction fPreviousAnnotation;
- // private GotoAnnotationAction fNextAnnotation;
+ private GotoAnnotationAction fPreviousAnnotation;
+ private GotoAnnotationAction fNextAnnotation;
private RetargetTextEditorAction fGotoMatchingBracket;
// 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$
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,
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));
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
+import java.util.ResourceBundle;
import java.util.Vector;
import net.sourceforge.phpdt.core.ElementChangedEvent;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.IPostSelectionProvider;
import org.eclipse.ui.part.IShowInTargetList;
import org.eclipse.ui.part.Page;
import org.eclipse.ui.part.ShowInContext;
+import org.eclipse.ui.texteditor.GotoAnnotationAction;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.ui.texteditor.IUpdate;
fContextMenuID = contextMenuID;
fEditor = editor;
fTogglePresentation = new TogglePresentationAction();
- fPreviousAnnotation = new GotoAnnotationAction(
- "PreviousAnnotation.", false); //$NON-NLS-1$
- fNextAnnotation = new GotoAnnotationAction("NextAnnotation.", true); //$NON-NLS-1$
+ ResourceBundle bundle = PHPEditorMessages.getResourceBundle();
+ fPreviousAnnotation = new GotoAnnotationAction(bundle,
+ "PreviousAnnotation.", null, false); //$NON-NLS-1$
+ fNextAnnotation = new GotoAnnotationAction(bundle,
+ "NextAnnotation.", null, true); //$NON-NLS-1$
fShowJavadoc = (TextEditorAction) fEditor.getAction("ShowJavaDoc"); //$NON-NLS-1$
fUndo = fEditor.getAction(ITextEditorActionConstants.UNDO);
fRedo = fEditor.getAction(ITextEditorActionConstants.REDO);