Class CommandExec
- java.lang.Object
-
- org.eclipse.graphiti.internal.command.CommandExec
-
public class CommandExec extends java.lang.Object
The Class CommandExec.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
executeCommand(ICommand command, org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Execute a given command within the givenTransactionalEditingDomain
.
IMPORTANT: use this method only in situations in which you don't have an open diagram editor.static void
executeFeatureWithContext(IFeature feature, IContext context)
Execute feature with context.
IMPORTANT: use this method only in situations in which you don't have an open diagram editor.static CommandExec
getSingleton()
Gets the singleton.
-
-
-
Method Detail
-
executeCommand
public boolean executeCommand(ICommand command, org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain)
Execute a given command within the givenTransactionalEditingDomain
.
IMPORTANT: use this method only in situations in which you don't have an open diagram editor. This method will simply execute the command on the command stack of the EMF editing domain, while the editor wraps this with a workspace command stack that will additionally monitor if an operation has really done any changes and in case not will reset the editor dirty flag again (seeIFeature.hasDoneChanges()
.
If you have a DiagramEditor instance use its method executeFeature instead.- Parameters:
command
- the commandeditingDomain
- the transactional editingDomain- Returns:
- true, if successful
-
getSingleton
public static CommandExec getSingleton()
Gets the singleton.- Returns:
- the singleton
-
executeFeatureWithContext
public static void executeFeatureWithContext(IFeature feature, IContext context)
Execute feature with context.
IMPORTANT: use this method only in situations in which you don't have an open diagram editor. This method will simply execute the command on the command stack of the EMF editing domain, while the editor wraps this with a workspace command stack that will additionally monitor if an operation has really done any changes and in case not will reset the editor dirty flag again (seeIFeature.hasDoneChanges()
.
If you have a DiagramEditor instance use its method executeFeature instead.- Parameters:
feature
- the featurecontext
- the context
-
-