Package org.eclipse.core.commands.operations

Examples of org.eclipse.core.commands.operations.IUndoableOperation.addContext()


     * possible. This is necessary for the UI Redo possibility being activated.
     */
    protected void simulateUndo() {
        IUndoableOperation auxOp = new NullOperation();
        try {
            auxOp.addContext(context);
            eclipseHistory.execute(auxOp, null, null);
            eclipseHistory.undo(context, null, null);
            if (!eclipseHistory.canRedo(context))
                log.error("Simulating Undo failed");
        } catch (ExecutionException e) {
View Full Code Here


      // First replace the undo context
      IUndoableOperation op= operations[i];
      if (op instanceof IContextReplacingOperation) {
        ((IContextReplacingOperation)op).replaceContext(oldUndoContext, getUndoContext());
      } else {
        op.addContext(getUndoContext());
        op.removeContext(oldUndoContext);
      }
      // Now update the manager that owns the text edit.
      if (op instanceof UndoableTextChange) {
        ((UndoableTextChange)op).fDocumentUndoManager= 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.