de.cau.cs.kieler.synccharts.text.actions.bridge
Class ActionLabelParseCommand
java.lang.Object
org.eclipse.emf.common.command.AbstractCommand
de.cau.cs.kieler.synccharts.text.actions.bridge.ActionLabelParseCommand
- All Implemented Interfaces:
- Command
public class ActionLabelParseCommand
- extends AbstractCommand
Wrapper of the parsing operation into a GMF AbstractTransactionalCommand.
Hence parsing of an Action label into trigger and effects Expression objects
can be done either by manually calling the parse method or by excuting the
command on a GEF/GMF command stack.
- Rating

- (2010-01-19) proposed by haf
Method Summary |
static void |
copyActionContents(Action source,
Action target)
Move all contents from one Action object to another. |
void |
execute()
|
void |
parse()
Run the actual parse operation with the element and new string set by the
constructor before. |
protected boolean |
prepare()
|
void |
redo()
Simply calls execute. |
void |
undo()
|
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand |
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString |
ActionLabelParseCommand
public ActionLabelParseCommand(EObject theElement,
String theNewString,
com.google.inject.Injector theInjector)
- Parameters:
theElement
- the target elementtheNewString
- the String to be parsedtheInjector
- the Xtext Guice Injector
execute
public void execute()
-
redo
public void redo()
- Simply calls execute.
undo
public void undo()
- Specified by:
undo
in interface Command
- Overrides:
undo
in class AbstractCommand
parse
public void parse()
throws KielerModelException,
IOException
- Run the actual parse operation with the element and new string set by the
constructor before.
- Throws:
KielerModelException
- if parsing of the string fails
IOException
- only if there is an internal parser error
copyActionContents
public static void copyActionContents(Action source,
Action target)
- Move all contents from one Action object to another.
- Parameters:
source
- the source of the movementtarget
- the target of the movement
prepare
protected boolean prepare()
- Overrides:
prepare
in class AbstractCommand