Package org.eclipse.ui.internal.editors.quickdiff

Examples of org.eclipse.ui.internal.editors.quickdiff.RevertLineAction


      }
    };
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICKDIFF_TOGGLE);
    setAction(ITextEditorActionConstants.QUICKDIFF_TOGGLE, action);

    action= new RevertLineAction(this, false);
    action.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICKDIFF_REVERTLINE);
    setAction(ITextEditorActionConstants.QUICKDIFF_REVERTLINE, action);

    action= new RevertSelectionAction(this, false);
    setAction(ITextEditorActionConstants.QUICKDIFF_REVERTSELECTION, action);
View Full Code Here


      IAction quickdiffAction= getAction(ITextEditorActionConstants.QUICKDIFF_TOGGLE);
      quickdiffAction.setChecked(isChangeInformationShowing());
      menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, quickdiffAction);

      if (isChangeInformationShowing()) {
        TextEditorAction revertLine= new RevertLineAction(this, true);
        TextEditorAction revertSelection= new RevertSelectionAction(this, true);
        TextEditorAction revertBlock= new RevertBlockAction(this, true);
        TextEditorAction revertDeletion= new RestoreAction(this, true);

        revertSelection.update();
        revertBlock.update();
        revertLine.update();
        revertDeletion.update();

        // only add block action if selection action is not enabled
        if (revertSelection.isEnabled())
          menu.appendToGroup(ITextEditorActionConstants.GROUP_RESTORE, revertSelection);
        else if (revertBlock.isEnabled())
          menu.appendToGroup(ITextEditorActionConstants.GROUP_RESTORE, revertBlock);
        if (revertLine.isEnabled())
          menu.appendToGroup(ITextEditorActionConstants.GROUP_RESTORE, revertLine);
        if (revertDeletion.isEnabled())
          menu.appendToGroup(ITextEditorActionConstants.GROUP_RESTORE, revertDeletion);
      }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.editors.quickdiff.RevertLineAction

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.