de.cau.cs.kieler.synccharts.text.interfaces.bridge
Class InterfaceDeclParseCommand

java.lang.Object
  extended by org.eclipse.emf.common.command.AbstractCommand
      extended by de.cau.cs.kieler.synccharts.text.interfaces.bridge.InterfaceDeclParseCommand
All Implemented Interfaces:
Command

public class InterfaceDeclParseCommand
extends AbstractCommand

Command for parsing the interface declaration string. Also provides some methods to return a xtext resource with the parsed interface declaration.

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.emf.common.command.AbstractCommand
AbstractCommand.NonDirtying
 
Field Summary
 
Fields inherited from class org.eclipse.emf.common.command.AbstractCommand
description, isExecutable, isPrepared, label
 
Constructor Summary
InterfaceDeclParseCommand(State rootElement, com.google.inject.Injector theInjector)
           
 
Method Summary
 void execute()
          
protected  org.eclipse.xtext.resource.XtextResource getParsedResource()
          Parses the current interface declaration and returns the surrounding resource.
protected  void parseInterfaceDecl()
          parse the current interface declaration string and afterwards inject the parsed signals in the current state.
protected  boolean prepare()
          
protected  void processInterfaceDeclParse()
          connection for Handler.
 void redo()
          
 void undo()
          
 
Methods inherited from class org.eclipse.emf.common.command.AbstractCommand
canExecute, canUndo, chain, dispose, getAffectedObjects, getDescription, getLabel, getResult, setDescription, setLabel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InterfaceDeclParseCommand

public InterfaceDeclParseCommand(State rootElement,
                                 com.google.inject.Injector theInjector)
Parameters:
rootElement - the state which contains the currently edited interface declaration.
theInjector - the injector.
Method Detail

execute

public void execute()


redo

public void redo()


undo

public void undo()

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

prepare

protected boolean prepare()

Overrides:
prepare in class AbstractCommand

processInterfaceDeclParse

protected void processInterfaceDeclParse()
connection for Handler.


getParsedResource

protected org.eclipse.xtext.resource.XtextResource getParsedResource()
Parses the current interface declaration and returns the surrounding resource.

Returns:
resource with current representation of interface declaration or null

parseInterfaceDecl

protected void parseInterfaceDecl()
                           throws KielerModelException,
                                  IOException
parse the current interface declaration string and afterwards inject the parsed signals in the current state.

Throws:
KielerModelException - if there's an error with the parsing
IOException - internal parser error