/** * Adds the given text edit to the operation history if it is not part of a compound change. * * @param edit the edit to be added */ private void addToOperationHistory(UndoableTextChange edit) { if (!fFoldingIntoCompoundChange || edit instanceof UndoableCompoundTextChange) { fHistory.add(edit); fLastAddedTextEdit= edit; } }
/** * Adds the given command to the operation history if it is not part of * a compound change. * * @param command the command to be added * @since 3.1 */ private void addToCommandStack(TextCommand command){ if (!fFoldingIntoCompoundChange || command instanceof CompoundTextCommand) { fHistory.add(command); fLastAddedCommand= command; } }
/** * Adds the given command to the operation history if it is not part of * a compound change. * * @param command the command to be added * @since 3.1 */ private void addToCommandStack(TextCommand command){ if (!fFoldingIntoCompoundChange || command instanceof CompoundTextCommand) { fHistory.add(command); fLastAddedCommand= command; } }
/** * Adds the given text edit to the operation history if it is not part of a compound change. * * @param edit the edit to be added */ private void addToOperationHistory(UndoableTextChange edit) { if (!fFoldingIntoCompoundChange || edit instanceof UndoableCompoundTextChange) { fHistory.add(edit); fLastAddedTextEdit= edit; } }
@Override public void addUndo(String name, Change change) { if (fActiveOperation != null) { UndoableOperation2ChangeAdapter operation= (UndoableOperation2ChangeAdapter)fActiveOperation.getTriggeringOperation(); operation.setUndoChange(change); operation.setLabel(name); fOperationHistory.add(fActiveOperation); fActiveOperation= null; } }
public void addUndo(String name, Change change) { if (fActiveOperation != null) { UndoableOperation2ChangeAdapter operation= (UndoableOperation2ChangeAdapter)fActiveOperation.getTriggeringOperation(); operation.setUndoChange(change); operation.setLabel(name); fOperationHistroy.add(fActiveOperation); fActiveOperation= null; } }
@Override public void addUndo(String name, Change change) { if (fActiveOperation != null) { UndoableOperation2ChangeAdapter operation= (UndoableOperation2ChangeAdapter)fActiveOperation.getTriggeringOperation(); operation.setUndoChange(change); operation.setLabel(name); fOperationHistory.add(fActiveOperation); fActiveOperation= null; } }
@Override public void flush() { if (fActiveOperation != null) { if (fIsOpen) { fOperationHistory.closeOperation(false, false, IOperationHistory.EXECUTE); } /* the triggering operation is invalid, but we must ensure that any * other operations executed while it was open remain in the undo * history. We accomplish this by adding the invalid operation, * since disposing the context later will cause it to be broken up into * its atomic parts. */ fOperationHistory.add(fActiveOperation); } fActiveOperation= null; fIsOpen= false; fOperationHistory.dispose(RefactoringCorePlugin.getUndoContext(), true, true, false); }
public void flush() { if (fActiveOperation != null) { if (fIsOpen) { fOperationHistroy.closeOperation(false, false, IOperationHistory.EXECUTE); } /* the triggering operation is invalid, but we must ensure that any * other operations executed while it was open remain in the undo * history. We accomplish this by adding the invalid operation, * since disposing the context later will cause it to be broken up into * its atomic parts. */ fOperationHistroy.add(fActiveOperation); } fActiveOperation= null; fIsOpen= false; fOperationHistroy.dispose(RefactoringCorePlugin.getUndoContext(), true, true, false); }
@Override public void flush() { if (fActiveOperation != null) { if (fIsOpen) { fOperationHistory.closeOperation(false, false, IOperationHistory.EXECUTE); } /* the triggering operation is invalid, but we must ensure that any * other operations executed while it was open remain in the undo * history. We accomplish this by adding the invalid operation, * since disposing the context later will cause it to be broken up into * its atomic parts. */ fOperationHistory.add(fActiveOperation); } fActiveOperation= null; fIsOpen= false; fOperationHistory.dispose(RefactoringCorePlugin.getUndoContext(), true, true, false); }