Class CommandExec
java.lang.Object
org.eclipse.graphiti.internal.command.CommandExec
The Class CommandExec.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
Gets the singleton.
-
Method Details
-
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
Gets the singleton.- Returns:
- the singleton
-
executeFeatureWithContext
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
-