de.cau.cs.kieler.synccharts.listener
Class TriggerListenerIDs

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by org.eclipse.emf.transaction.TriggerListener
          extended by de.cau.cs.kieler.synccharts.listener.FailSafeTriggerListener
              extended by de.cau.cs.kieler.synccharts.listener.FireOnceTriggerListener
                  extended by de.cau.cs.kieler.synccharts.listener.TriggerListenerIDs
All Implemented Interfaces:
EventListener, ResourceSetListener, ResourceSetListener.Internal

public class TriggerListenerIDs
extends FireOnceTriggerListener

A SyncCharts TriggerListener that handles different label values of SyncCharts, namely the Scope label and ID (i.e. identifiers for Regions and States). When either a new State or Region is created, the label and ID are set automatically to some unique dummy value, e.g. S0, S1, S2 for state name, _S0, _S1, _S2 for State ID and R0, R1, R2 for Region ID. Setting a State label explicitly will also set the State ID to that value (stripped by whitespace) and sibling IDs of anonymous states will be changed to a new unique one (i.e. a user set label has priority over an automatically set ID)

Rating red

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener
ResourceSetListener.Internal
 
Field Summary
 
Fields inherited from class de.cau.cs.kieler.synccharts.listener.FireOnceTriggerListener
transaction
 
Constructor Summary
TriggerListenerIDs()
          Public constructor setting up filters to react only on necessary events.
 
Method Summary
 Command transactionAboutToCommit(ResourceSetChangeEvent event)
          Setting the Transaction in the event to null will also trigger this listener no matter what.
protected  Command trigger(TransactionalEditingDomain domain, Notification notification)
          Trigger this TriggerListener for all events that the filters match to which are specified in the constructor.
 
Methods inherited from class org.eclipse.emf.transaction.TriggerListener
isPrecommitOnly
 
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl
getFilter, getTarget, isAggregatePrecommitListener, isPostcommitOnly, resourceSetChanged, setTarget, unsetTarget
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriggerListenerIDs

public TriggerListenerIDs()
Public constructor setting up filters to react only on necessary events.

Method Detail

trigger

protected Command trigger(TransactionalEditingDomain domain,
                          Notification notification)
Trigger this TriggerListener for all events that the filters match to which are specified in the constructor.

Specified by:
trigger in class TriggerListener

transactionAboutToCommit

public Command transactionAboutToCommit(ResourceSetChangeEvent event)
                                 throws RollbackException
Description copied from class: FireOnceTriggerListener
Setting the Transaction in the event to null will also trigger this listener no matter what.

Specified by:
transactionAboutToCommit in interface ResourceSetListener
Overrides:
transactionAboutToCommit in class FireOnceTriggerListener
Throws:
RollbackException