Examples of UndoActionHandler


Examples of org.eclipse.ui.operations.UndoActionHandler

  private void createGlobalActionHandlers()
  {
    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);
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

      root = adapter.getRootPane();
      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();
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

    IUndoContext undoContext= getUndoContext();
    if (undoContext != null) {
      // Use actions provided by global undo/redo
     
      // Create the undo action
      OperationHistoryActionHandler undoAction= new UndoActionHandler(getEditorSite(), undoContext);
      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);
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

  }

  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();
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

      actionBars.setGlobalActionHandler(ActionFactory.REVERT.getId(), new Action() {
        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));
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

    IUndoContext undoContext= getUndoContext();
    if (undoContext != null) {
      // Use actions provided by global undo/redo

      // Create the undo action
      OperationHistoryActionHandler undoAction= new UndoActionHandler(getEditorSite(), undoContext);
      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);
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

  @Override
  protected void showPageRec(PageRec pageRec) {
    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);
View Full Code Here

Examples of org.eclipse.ui.operations.UndoActionHandler

              .readMap(new ByteArrayInputStream(document.get()
                  .getBytes()));
        }
      }
      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);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.