Interface ITransactionalOperation

All Superinterfaces:
IUndoableOperation
All Known Implementing Classes:
AbstractCompositeOperation, AddContentChildOperation, AddSnapToStrategyOperation, AttachToContentAnchorageOperation, BendContentOperation, BendVisualOperation, ChangeContentsOperation, ChangeFocusOperation, ChangeSelectionOperation, ChangeViewportOperation, DeselectOperation, DetachFromContentAnchorageOperation, ForwardUndoCompositeOperation, RemoveContentChildOperation, RemoveSnapToStrategyOperation, ResizeContentOperation, ResizeOperation, RevealOperation, ReverseUndoCompositeOperation, SelectOperation, SetPropertyValueOperation, SetRefreshVisualOperation, TransformContentOperation, TransformVisualOperation

public interface ITransactionalOperation extends IUndoableOperation
An ITransactionalOperation is an IUndoableOperation that tolerates successive calls to IUndoableOperation.execute(IProgressMonitor, IAdaptable) and IUndoableOperation.undo(IProgressMonitor, IAdaptable) and allows to check whether it has an overall effect (isNoOp()) compared to the initial state upon construction.

It is used by transaction policies to encapsulate their applied changes. The transaction policy will potentially execute the operation locally (to realize "live-feedback") before returning it in its AbstractPolicy.commit() method. It will then be executed on the IOperationHistory, but only if it has an overall effect that needs to be undoable.

  • Method Details

    • isContentRelevant

      boolean isContentRelevant()
      Returns true if this ITransactionalOperation is actually changing model data (instead of only affecting the visualization). Otherwise returns false. The content relevance of an ITransactionalOperation can be checked to determine if the execution of the operation will affect the model, for example, to set an editor's dirty flag.
      Returns:
      true if this ITransactionalOperation is actually changing model data, otherwise false.
    • isNoOp

      boolean isNoOp()
      Returns true if this ITransactionalOperation has no effect (in comparison to its initial state). Otherwise returns false.
      Returns:
      true if this ITransactionalOperation has no effect, otherwise false.