@Override public void changePerformed(Change change, boolean successful) { if (fIsOpen && fActiveOperation != null) { fOperationHistory.closeOperation(successful, false, IOperationHistory.EXECUTE); fIsOpen= false; } }
public void changePerformed(Change change, boolean successful) { if (fIsOpen && fActiveOperation != null) { fOperationHistroy.closeOperation(successful, false, IOperationHistory.EXECUTE); fIsOpen= false; } }
@Override public void changePerformed(Change change, boolean successful) { if (fIsOpen && fActiveOperation != null) { fOperationHistory.closeOperation(successful, false, IOperationHistory.EXECUTE); fIsOpen= false; } }
@Override public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.EXECUTE); try { IStatus status = triggeringOperation.execute(monitor, info); history.closeOperation(status.isOK(), false, IOperationHistory.EXECUTE); return status; } catch (ExecutionException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } catch (RuntimeException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.EXECUTE); try { IStatus status = triggeringOperation.execute(monitor, info); history.closeOperation(status.isOK(), false, IOperationHistory.EXECUTE); return status; } catch (ExecutionException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } catch (RuntimeException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.EXECUTE); try { IStatus status = triggeringOperation.execute(monitor, info); history.closeOperation(status.isOK(), false, IOperationHistory.EXECUTE); return status; } catch (ExecutionException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } catch (RuntimeException e) { history.closeOperation(false, false, IOperationHistory.EXECUTE); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.UNDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.undo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.UNDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.UNDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.undo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.UNDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.REDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.redo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.REDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.REDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.redo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.REDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.REDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.redo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.REDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.REDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@Override public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { if (triggeringOperation != null) { history.openOperation(this, IOperationHistory.UNDO); List<IUndoableOperation> childrenToRestore = new ArrayList<>(children); try { removeAllChildren(); IStatus status = triggeringOperation.undo(monitor, info); if (!status.isOK()) { children = childrenToRestore; } history.closeOperation(status.isOK(), false, IOperationHistory.UNDO); return status; } catch (ExecutionException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } catch (RuntimeException e) { children = childrenToRestore; history.closeOperation(false, false, IOperationHistory.UNDO); throw e; } } return IOperationHistory.OPERATION_INVALID_STATUS; }
@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); }