Examples of IUndoableOperation


Examples of org.eclipse.core.commands.operations.IUndoableOperation

  public boolean canExecute()
  {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canExecute())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  }

  public boolean canRedo() {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canRedo())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  }

  public boolean canUndo() {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canUndo())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  public void dispose()
  {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
      op.dispose();
    }
  }
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  public boolean canExecute()
  {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canExecute())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  }

  public boolean canRedo() {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canRedo())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  }

  public boolean canUndo() {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
     
      // fail fast
      if (!op.canUndo())
      {
        return false;
      }
    }
   
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

  public void dispose()
  {
    for (final Iterator it = _stepOperations.iterator(); it.hasNext();)
    {
      IUndoableOperation op = (IUndoableOperation) it.next();
      op.dispose();
    }
  }
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

    public void documentChanged(DocumentEvent event) {
      fPreservedRedoModificationStamp= event.getModificationStamp();

      // record the current valid state for the top operation in case it remains the
      // top operation but changes state.
      IUndoableOperation op= fHistory.getUndoOperation(fUndoContext);
      boolean wasValid= false;
      if (op != null)
        wasValid= op.canUndo();
      // Process the change, providing the before and after timestamps
      processChange(event.getOffset(), event.getOffset() + event.getLength(), event.getText(), fReplacedText, fPreservedUndoModificationStamp, fPreservedRedoModificationStamp);

      // now update fCurrent with the latest buffers from the document change.
      fCurrent.pretendCommit();
View Full Code Here

Examples of org.eclipse.core.commands.operations.IUndoableOperation

    IUndoContext oldUndoContext= manager.getUndoContext();
    // Get the history for the old undo context.
    IUndoableOperation [] operations= OperationHistoryFactory.getOperationHistory().getUndoHistory(oldUndoContext);
    for (int i= 0; i < operations.length; i++) {
      // 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;
      }
    }

    IUndoableOperation op= OperationHistoryFactory.getOperationHistory().getUndoOperation(getUndoContext());
    if (op != null && !(op instanceof UndoableTextChange))
      return;

    // Record the transfer itself as an undoable change.
    // If the transfer results from some open operation, recording this change will
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.