de.cau.cs.kieler.core.model.xtend.m2m
Class XtendTransformationCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by org.eclipse.emf.transaction.RecordingCommand
          extended by de.cau.cs.kieler.core.model.xtend.m2m.XtendTransformationCommand
All Implemented Interfaces:
Command, ConditionalRedoCommand

public class XtendTransformationCommand
extends RecordingCommand

A command executing an xtend transformation. To support undo functionality it's important that this is a RecordingCommand. The result of the transformation is stored and can be retrieved after execution.

Rating proposed yellow
(2011-02-14) uru

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.util.ConditionalRedoCommand
ConditionalRedoCommand.Compound
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
XtendTransformationCommand(org.eclipse.xtend.XtendFacade theXtendFacade, TransformationDescriptor theDescriptor, TransactionalEditingDomain editingDomain)
           
 
Method Summary
 boolean canExecute()
          
protected  void doExecute()
           
 Collection<Object> getResult()
           
 
Methods inherited from class org.eclipse.emf.transaction.RecordingCommand
canRedo, canUndo, chain, dispose, execute, postExecute, preExecute, prepare, redo, undo
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
getAffectedObjects, getDescription, getLabel, setDescription, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.common.command.Command
getAffectedObjects, getDescription, getLabel
 

Constructor Detail

XtendTransformationCommand

public XtendTransformationCommand(org.eclipse.xtend.XtendFacade theXtendFacade,
                                  TransformationDescriptor theDescriptor,
                                  TransactionalEditingDomain editingDomain)
Parameters:
theXtendFacade - the facade used to execute the transformation
theDescriptor - information about which transformation to execute
editingDomain - TransactionalEditingDomain on which the transformation takes place.
Method Detail

canExecute

public boolean canExecute()

Specified by:
canExecute in interface Command
Overrides:
canExecute in class AbstractCommand

doExecute

protected void doExecute()
Specified by:
doExecute in class RecordingCommand

getResult

public Collection<Object> getResult()
Specified by:
getResult in interface Command
Overrides:
getResult in class AbstractCommand
Returns:
the result of the execution as first element of a collection. In case the execution has not been executed yet, null is returned.