de.cau.cs.kieler.ksbase.ui.handler
Class TransformationCommand
java.lang.Object
org.eclipse.core.commands.operations.AbstractOperation
org.eclipse.emf.workspace.AbstractEMFOperation
org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand
de.cau.cs.kieler.ksbase.ui.handler.TransformationCommand
- All Implemented Interfaces:
- IUndoableOperation, ICommand, org.eclipse.gmf.runtime.common.core.internal.command.ICommandWithSettableResult
public class TransformationCommand
- extends AbstractTransactionalCommand
The command to execute a transformation.
- Rating

- (2009-12-15)
Methods inherited from class org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand |
aggregateStatuses, cleanup, compose, didRedo, didUndo, doExecute, doRedo, doUndo, getAffectedFiles, getCommandResult, getWorkspaceFiles, getWorkspaceFiles, internalSetResult, reduce, setResult |
Methods inherited from class org.eclipse.emf.workspace.AbstractEMFOperation |
canRedo, canSetOptions, canUndo, didCommit, dispose, execute, getChange, getEditingDomain, getOptions, isReuseParentTransaction, redo, setOptions, setReuseParentTransaction, undo |
Methods inherited from interface org.eclipse.gmf.runtime.common.core.command.ICommand |
setLabel |
Methods inherited from interface org.eclipse.core.commands.operations.IUndoableOperation |
addContext, canExecute, canRedo, canUndo, dispose, execute, getContexts, getLabel, hasContext, redo, removeContext, undo |
TransformationCommand
public TransformationCommand(TransactionalEditingDomain domain,
String label,
IAdaptable adapter)
- Creates a command to execute a transformation.
- Parameters:
domain
- the editing domain through which model changes are madelabel
- the command labeladapter
- an adapter to the View
of the base diagram
doExecuteWithResult
protected CommandResult doExecuteWithResult(IProgressMonitor monitor,
IAdaptable info)
throws ExecutionException
- Executes the transformation. This will only work, if a component has been
set before.
- Specified by:
doExecuteWithResult
in class AbstractTransactionalCommand
- Parameters:
monitor
- Progress monitor for the executioninfo
- Additional informations for the command
- Returns:
- Either an Error/Warning command result if the execution failed,
or else OK
- Throws:
ExecutionException
- if the Execution failed due to a critical error.- See Also:
AbstractTransactionalCommand
#doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor,
org.eclipse.core.runtime.IAdaptable)
initialize
public final boolean initialize(IEditorPart editPart,
List<Object> selection,
String command,
String fileName,
List<String> packages,
ITransformationFramework framework)
- Initializes the transformation.
- Parameters:
editPart
- Current edit partselection
- Current selectioncommand
- The command to executefileName
- Name of the transformation filepackages
- The packages of the underlying meta modelframework
- The transformation framework to use for execution
- Returns:
- False if an error occurred