modesteditor.core.stepsimulation
Class PaltTransition

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

public class PaltTransition
extends SimulationNode

This class represents a PaltTransition which is taken after the action guarding the palt was taken.


Field Summary
 
Fields inherited from class modesteditor.core.stepsimulation.SimulationNode
alphabet, children, column, guard, hidden, isActive, length, line, newLabel, parent
 
Constructor Summary
PaltTransition(int line, int column)
          Constructor for setting line and column parameters.
PaltTransition(int line, int column, double prob, java.util.ArrayList<SimulationNode> alt)
          Default constructor
PaltTransition(int line, int column, double prob, SimulationNode alt)
          Constructor for the PaltNode
 
Method Summary
 void addAlternative(PaltTransition alt)
          Method for adding an alternative in a parallel setting.
 void childIsFinished(SimulationNode child)
          Child notifies the parent that is is finished.
 java.util.List<ParTransition> collectParTransitions()
          Abstract method for generating the list of parallel transitions of the node.
 java.util.List<SimulationNode> collectTransitions()
          Abstract method for generating the list of possible transitions.
 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.util.ArrayList<SimulationNode> getPAlternatives()
           
 double getProbability()
           
 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 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 takeTransition()
          Abstract method for taking a Transition, the node will care for itself how it organizes the transition.
 
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

PaltTransition

public PaltTransition(int line,
                      int column)
Constructor for setting line and column parameters.

Parameters:
line -
column -

PaltTransition

public PaltTransition(int line,
                      int column,
                      double prob,
                      java.util.ArrayList<SimulationNode> alt)
Default constructor

Parameters:
line -
column -
prob - probability of the transition
alt - alternatives that can be taken in the transition (can be more than one in a parallel case).

PaltTransition

public PaltTransition(int line,
                      int column,
                      double prob,
                      SimulationNode alt)
Constructor for the PaltNode

Parameters:
line -
column -
prob - probability of the transition
alt - first alternative that can be taken in the transition
Method Detail

addAlternative

public void addAlternative(PaltTransition alt)
Method for adding an alternative in a parallel setting.

Parameters:
prob -
alt -

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

collectParTransitions

public java.util.List<ParTransition> collectParTransitions()
Description copied from class: SimulationNode
Abstract method for generating the list of parallel transitions of the node. The method also adds disabled transitions for the letters in the alphabet that cannot be taken.

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

collectTransitions

public java.util.List<SimulationNode> collectTransitions()
Description copied from class: SimulationNode
Abstract method for generating the list of possible transitions.

Specified by:
collectTransitions in class SimulationNode
Returns:
the list of 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

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

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()
Description copied from class: SimulationNode
Abstract method for taking a Transition, the node will care for itself how it organizes the transition.

Specified by:
takeTransition 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

getPAlternatives

public java.util.ArrayList<SimulationNode> getPAlternatives()
Returns:
the pAlternatives

getProbability

public double getProbability()
Returns:
the probability

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