modesteditor.core.stepsimulation
Class ParTransition

java.lang.Object
  extended by modesteditor.core.stepsimulation.SimulationNode
      extended by modesteditor.core.stepsimulation.ParTransition

public class ParTransition
extends SimulationNode

Class representing a set of parallel transitions.


Field Summary
 
Fields inherited from class modesteditor.core.stepsimulation.SimulationNode
alphabet, children, column, guard, hidden, isActive, length, line, newLabel, parent
 
Constructor Summary
ParTransition(ParNode parent, java.lang.String letter, java.util.ArrayList<SimulationNode> trans)
          Constructor for the ParTransitions with only one transition per language construct.
ParTransition(SimulationNode parent, java.lang.String letter)
          Default constructor which registers the parent and the representing letter.
 
Method Summary
 void addBreakTransition(BreakNode trans)
          Method adding a break Node to the parallel transition
 void addPaltTransition(PaltTransition trans)
          Adds a PaltTransition to the list of PaltTransitions
 void addPaltTransitionList(java.util.ArrayList<PaltTransition> trans)
          Adds a PaltTransition list to the list of PaltTransitions
 void addParTransition(ParTransition trans)
          Adds a transition to the transition pool.
 void addTransition(SimulationNode trans)
          Adds a transition to the transition pool.
 void childIsFinished(SimulationNode child)
          Child notifies the parent that is is finished.
 java.util.List<ParTransition> collectParTransitions()
          Not needed since the class is already a transition
 java.util.List<SimulationNode> collectTransitions()
          Not needed since the class is already a transition
 java.util.ArrayList<org.eclipse.core.resources.IMarker> createSimHighlighting(org.eclipse.core.resources.IResource resource, org.eclipse.jface.text.IDocument document, boolean isPalt)
          Method that creates the markers that do the highlighting in the step simulation.
 void generateAlphabet()
          Abstract method to generate the alphabet of the node.
 java.lang.String getAssignment()
           
 java.util.ArrayList<PaltTransition> getPaltTransitions()
           
 java.lang.String getRepresentingLetter()
           
 java.util.List<SimulationNode> getTransitions()
           
 void inDoSubtree()
          Method that signals that the break in the transition is in a do loop
 boolean isEnabled()
          Is enabled exactly if not disabled earlier and the transition list is not empty.
 boolean isThrowStatement()
           
 void notificationOfChildActivity(SimulationNode child)
          Method which is called from the child in order to notify the parent that it is active.
 java.lang.String printTransition()
          Method that prints the SimulationNode TODO better incoporation in Eclipse
 void relabelBy(java.lang.String newLabel)
          Method relabels the transition in case of a relabeling.
 void releaseTransitions()
          Method shall release the active transitions of the node an it's children in case a do loop is broken or a STOP occured ...
 void setAssignment(java.lang.String assignment)
           
 void setThrowStatement()
          Method called to indicate that the transition is a thrown exception and thus always enabled.
 void takeTransition()
          If the transition is taken, this method ensures that all child transitions are taken parallely.
 void willBeCaught()
          Method that signals that the thrown exception will be caught later on.
 
Methods inherited from class modesteditor.core.stepsimulation.SimulationNode
addChild, breakTransitionTaken, exceptionThrown, getAlphabet, getColumn, getGuard, getLength, getLine, getName, getParent, getParentList, hide, isActive, isFinished, isHidden, relabelNode, setActive, setParent, stopCalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParTransition

public ParTransition(ParNode parent,
                     java.lang.String letter,
                     java.util.ArrayList<SimulationNode> trans)
Constructor for the ParTransitions with only one transition per language construct.

Parameters:
parent -
letter -
trans -

ParTransition

public ParTransition(SimulationNode parent,
                     java.lang.String letter)
Default constructor which registers the parent and the representing letter.

Parameters:
parent -
letter -
Method Detail

addTransition

public void addTransition(SimulationNode trans)
Adds a transition to the transition pool. If the actual letter of the transition isn't the representing letter, the ParTransition is disabled.

Parameters:
trans -

addParTransition

public void addParTransition(ParTransition trans)
Adds a transition to the transition pool. If the transition is disabled the ParTransition is disabled.

Parameters:
trans -

addBreakTransition

public void addBreakTransition(BreakNode trans)
Method adding a break Node to the parallel transition

Parameters:
trans -

isEnabled

public boolean isEnabled()
Is enabled exactly if not disabled earlier and the transition list is not empty.

Returns:
the enabledness

setThrowStatement

public void setThrowStatement()
Method called to indicate that the transition is a thrown exception and thus always enabled.


getRepresentingLetter

public java.lang.String getRepresentingLetter()
Returns:
the letter of the action that is to be taken parallely

relabelBy

public void relabelBy(java.lang.String newLabel)
Method relabels the transition in case of a relabeling.

Parameters:
newLabel -

getTransitions

public java.util.List<SimulationNode> getTransitions()
Returns:
the transitions that are taken parallely

childIsFinished

public void childIsFinished(SimulationNode child)
Description copied from class: SimulationNode
Child notifies the parent that is is finished. Parent has to check if it is finished too.

Specified by:
childIsFinished in class SimulationNode

collectTransitions

public java.util.List<SimulationNode> collectTransitions()
Not needed since the class is already a transition

Specified by:
collectTransitions in class SimulationNode
Returns:
the list of transitions

collectParTransitions

public java.util.List<ParTransition> collectParTransitions()
Not needed since the class is already a transition

Specified by:
collectParTransitions in class SimulationNode
Returns:
the list of parallel transitions

generateAlphabet

public void generateAlphabet()
Description copied from class: SimulationNode
Abstract method to generate the alphabet of the node.

Specified by:
generateAlphabet in class SimulationNode

releaseTransitions

public void releaseTransitions()
Description copied from class: SimulationNode
Method shall release the active transitions of the node an it's children in case a do loop is broken or a STOP occured ...

Specified by:
releaseTransitions in class SimulationNode

takeTransition

public void takeTransition()
If the transition is taken, this method ensures that all child transitions are taken parallely.

Specified by:
takeTransition in class SimulationNode

notificationOfChildActivity

public void notificationOfChildActivity(SimulationNode child)
Description copied from class: SimulationNode
Method which is called from the child in order to notify the parent that it is active.

Specified by:
notificationOfChildActivity in class SimulationNode

printTransition

public java.lang.String printTransition()
Description copied from class: SimulationNode
Method that prints the SimulationNode TODO better incoporation in Eclipse

Overrides:
printTransition in class SimulationNode

createSimHighlighting

public java.util.ArrayList<org.eclipse.core.resources.IMarker> createSimHighlighting(org.eclipse.core.resources.IResource resource,
                                                                                     org.eclipse.jface.text.IDocument document,
                                                                                     boolean isPalt)
Description copied from class: SimulationNode
Method that creates the markers that do the highlighting in the step simulation. First creates the markers for itself and then for the parent hierarchy.

Overrides:
createSimHighlighting in class SimulationNode
Parameters:
resource - where to add the markers
document - needed in order to calculate the offsets
Returns:
a list of markers so that those can be disposed of when not needed anymore

addPaltTransition

public void addPaltTransition(PaltTransition trans)
Adds a PaltTransition to the list of PaltTransitions

Parameters:
trans - transition to add

addPaltTransitionList

public void addPaltTransitionList(java.util.ArrayList<PaltTransition> trans)
Adds a PaltTransition list to the list of PaltTransitions

Parameters:
trans - transitions to add

getPaltTransitions

public java.util.ArrayList<PaltTransition> getPaltTransitions()
Returns:
the paltTransitions

getAssignment

public java.lang.String getAssignment()
Returns:
the assignment

setAssignment

public void setAssignment(java.lang.String assignment)
Parameters:
assignment - the assignment to set

inDoSubtree

public void inDoSubtree()
Method that signals that the break in the transition is in a do loop


willBeCaught

public void willBeCaught()
Method that signals that the thrown exception will be caught later on.


isThrowStatement

public boolean isThrowStatement()