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

java.lang.Object
  extended by de.cau.cs.kieler.synccharts.text.interfaces.bridge.InterfaceDeclProcessorWrapper

public class InterfaceDeclProcessorWrapper
extends Object

Wrapping class to communicate between trigger listener and the acutal serialize/parse commands.

Rating red

Field Summary
static boolean PARSE
          determines that the interface declaration string should be parsed into internal syncchart objects.
static boolean SERIALIZE
          determines that the internal signals and variables should be serialized into the interface declaration string.
 
Constructor Summary
InterfaceDeclProcessorWrapper()
          Constructor.
 
Method Summary
 Command getCanonialSerializeCommand(State s)
           
 Command getParseCommand(State state)
          Command parses the interface declaration of a state.
 Command getSerializationCommand(State state, EObject changedSignalOrVar)
          return serialization command suited for any other change than the previous constructor is covering.
 Command getSerializationCommand(State state, EObject changedSignalOrVar, String oldName, int occurredChange)
          return serialization command suited if a signal's or variable's name changed, something was added/deleted, or some change within a region occured.
static void processInterfaceDecl(EObject parent, boolean parse)
          public connection for the handler.
 void processInterfaceDeclCommand(EObject parent, boolean parse)
          Creates an InterfaceDeclParseCommand, and executes it via the command stack.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARSE

public static final boolean PARSE
determines that the interface declaration string should be parsed into internal syncchart objects.

See Also:
Constant Field Values

SERIALIZE

public static final boolean SERIALIZE
determines that the internal signals and variables should be serialized into the interface declaration string.

See Also:
Constant Field Values
Constructor Detail

InterfaceDeclProcessorWrapper

public InterfaceDeclProcessorWrapper()
Constructor. creates injector for parsing

Method Detail

getSerializationCommand

public Command getSerializationCommand(State state,
                                       EObject changedSignalOrVar,
                                       String oldName,
                                       int occurredChange)
return serialization command suited if a signal's or variable's name changed, something was added/deleted, or some change within a region occured.

Parameters:
state - the root state containing the ifdecl.
changedSignalOrVar - either the changed signal or the variable.
oldName - if there was a renaming - the name prior modifying
occurredChange - determines the change that occurred
Returns:
serialization command

getSerializationCommand

public Command getSerializationCommand(State state,
                                       EObject changedSignalOrVar)
return serialization command suited for any other change than the previous constructor is covering.

Parameters:
state - the root state containing the ifdecl.
changedSignalOrVar - either the changed signal or the variable.
Returns:
serialization command

getParseCommand

public Command getParseCommand(State state)
Command parses the interface declaration of a state.

Parameters:
state - state whose interface declaration should be parsed
Returns:
command parsing interface declaration

processInterfaceDecl

public static void processInterfaceDecl(EObject parent,
                                        boolean parse)
                                 throws Exception
public connection for the handler. Creates an InterfaceDeclParseCommand, and executes it via the command stack.

Parameters:
parent - parent state containing the interface declaration.
parse - determine whether to parse or serialize.
Throws:
Exception - if there was a problem executing on the command stack.

processInterfaceDeclCommand

public void processInterfaceDeclCommand(EObject parent,
                                        boolean parse)
                                 throws KielerModelException
Creates an InterfaceDeclParseCommand, and executes it via the command stack.

Parameters:
parent - parent state containing the interface declaration.
parse - determine whether to parse or serialize.
Throws:
KielerModelException - if something else than a state was passed as parent.

getCanonialSerializeCommand

public Command getCanonialSerializeCommand(State s)