Package org.eclipse.ui.operations

Examples of org.eclipse.ui.operations.RedoActionHandler


  {
    undoContext = ((IUndoManagerExtension)textViewer.getUndoManager()).getUndoContext();
   
    // set up action handlers that operate on the current context
    undoAction = new UndoActionHandler(getSite(), undoContext);
    redoAction = new RedoActionHandler(getSite(), undoContext);
   
    IActionBars actionBars = getViewSite().getActionBars();
   
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
    actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
View Full Code Here


      Container parent = root.getParent();
      if (parent != null)
        parent.remove(root);
      IEditorSite site = editor.getEditorSite();
      undoAction = new UndoActionHandler(site, getUndoContext());
      redoAction = new RedoActionHandler(site, getUndoContext());
      IActionBars actionBars = site.getActionBars();
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
      actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
      rootBounds = adapter.getDesignBounds();
      root.setSize(rootBounds.width, rootBounds.height);
View Full Code Here

      PlatformUI.getWorkbench().getHelpSystem().setHelp(undoAction, IAbstractTextEditorHelpContextIds.UNDO_ACTION);
      undoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.UNDO);
      registerUndoRedoAction(ITextEditorActionConstants.UNDO, undoAction);

      // Create the redo action.
      OperationHistoryActionHandler redoAction= new RedoActionHandler(getEditorSite(), undoContext);
      PlatformUI.getWorkbench().getHelpSystem().setHelp(redoAction, IAbstractTextEditorHelpContextIds.REDO_ACTION);
      redoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.REDO);
      registerUndoRedoAction(ITextEditorActionConstants.REDO, redoAction);

      // Install operation approvers
      IOperationHistory history= OperationHistoryFactory.getOperationHistory();
View Full Code Here

  private void createGlobalActionHandlers(ShapeEditor editor) {

    // set up action handlers that operate on the current context
    undoAction = new UndoActionHandler(this.page.getActivePart().getSite(),
        editor.getUndoContext());
    redoAction = new RedoActionHandler(this.page.getActivePart().getSite(),
        editor.getUndoContext());

    IActionBars actionBars = getActionBars();
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
        undoAction);
View Full Code Here

        public void run() {
          editor.revert();
        }
      });
      actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), new UndoActionHandler(editor.getSite(), editor.getUndoContext()));
      actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), new RedoActionHandler(editor.getSite(), editor.getUndoContext()));
      // actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
      // getAction(editor, ITextEditorActionConstants.SELECT_ALL));
      // actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(),
      // getAction(editor, ITextEditorActionConstants.FIND));
      // actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(),
View Full Code Here

      PlatformUI.getWorkbench().getHelpSystem().setHelp(undoAction, IAbstractTextEditorHelpContextIds.UNDO_ACTION);
      undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
      registerUndoRedoAction(ITextEditorActionConstants.UNDO, undoAction);

      // Create the redo action.
      OperationHistoryActionHandler redoAction= new RedoActionHandler(getEditorSite(), undoContext);
      PlatformUI.getWorkbench().getHelpSystem().setHelp(redoAction, IAbstractTextEditorHelpContextIds.REDO_ACTION);
      redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
      registerUndoRedoAction(ITextEditorActionConstants.REDO, redoAction);

      // Install operation approvers
      IOperationHistory history= OperationHistoryFactory.getOperationHistory();
View Full Code Here

    super.showPageRec(pageRec);
    if (pageRec.page instanceof LayerViewPage) {
      MapEditor mapEditor = ((LayerViewPage) pageRec.page).getMapEditor();
      UndoActionHandler undoAction = new UndoActionHandler(getSite(), mapEditor.getUndoContext());
      undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
      RedoActionHandler redoAction = new RedoActionHandler(getSite(), mapEditor.getUndoContext());
      redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
      IActionBars actionBars = ((IViewSite) getSite()).getActionBars();
        actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
        actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
        // Update action bars.
        getViewSite().getActionBars().updateActionBars();
View Full Code Here

        }
      }
      IActionBars actionBars = getEditorSite().getActionBars();
      undoAction= new UndoActionHandler(getSite(), undoContext);
      undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
      redoAction= new RedoActionHandler(getSite(), undoContext);
      redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
     
      copyAction = new CopyAction(this);
      copyAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
      addPartPropertyListener((IPropertyChangeListener) copyAction);
View Full Code Here

TOP

Related Classes of org.eclipse.ui.operations.RedoActionHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.