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
AnITransactionalOperation
is anIUndoableOperation
that tolerates successive calls toIUndoableOperation.execute(IProgressMonitor, IAdaptable)
andIUndoableOperation.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. Thetransaction policy
will potentially execute the operation locally (to realize "live-feedback") before returning it in itsAbstractPolicy.commit()
method. It will then be executed on theIOperationHistory
, but only if it has an overall effect that needs to be undoable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isContentRelevant()
Returnstrue
if thisITransactionalOperation
is actually changing model data (instead of only affecting the visualization).boolean
isNoOp()
Returnstrue
if thisITransactionalOperation
has no effect (in comparison to its initial state).-
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo
-
-
-
-
Method Detail
-
isContentRelevant
boolean isContentRelevant()
Returnstrue
if thisITransactionalOperation
is actually changing model data (instead of only affecting the visualization). Otherwise returnsfalse
. The content relevance of anITransactionalOperation
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 thisITransactionalOperation
is actually changing model data, otherwisefalse
.
-
isNoOp
boolean isNoOp()
Returnstrue
if thisITransactionalOperation
has no effect (in comparison to its initial state). Otherwise returnsfalse
.- Returns:
true
if thisITransactionalOperation
has no effect, otherwisefalse
.
-
-