de.cau.cs.kieler.synccharts.diagram.custom.triggerlisteners
Class RedundantLabelTriggerListener

java.lang.Object
  extended by org.eclipse.emf.transaction.ResourceSetListenerImpl
      extended by org.eclipse.emf.transaction.TriggerListener
          extended by de.cau.cs.kieler.synccharts.diagram.custom.triggerlisteners.RedundantLabelTriggerListener
All Implemented Interfaces:
EventListener, ResourceSetListener, ResourceSetListener.Internal

public class RedundantLabelTriggerListener
extends TriggerListener

This class is responsible for hiding redundant labels. For example it hides the region id label if the parent state only has one region. It also hides the transition priority label if the source state only has one outgoing transition.

Rating proposed yellow
(2010-06-14)

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener
ResourceSetListener.Internal
 
Constructor Summary
RedundantLabelTriggerListener()
          Creates a new RedundantLabelTriggerListener.
RedundantLabelTriggerListener(NotificationFilter filter)
          Creates a new RedundantLabelTriggerListener.
 
Method Summary
static void hideAll()
          Hide all transition labels.
static void hideRedundant()
          Only hide redundant labels.
static void hideRedundantLabels()
          Manually trigger the trigger listener.
protected  Command trigger(TransactionalEditingDomain domain, Notification notification)
          
 
Methods inherited from class org.eclipse.emf.transaction.TriggerListener
isPrecommitOnly, transactionAboutToCommit
 
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

RedundantLabelTriggerListener

public RedundantLabelTriggerListener()
Creates a new RedundantLabelTriggerListener.


RedundantLabelTriggerListener

public RedundantLabelTriggerListener(NotificationFilter filter)
Creates a new RedundantLabelTriggerListener.

Parameters:
filter - the filter
Method Detail

hideAll

public static void hideAll()
Hide all transition labels.


hideRedundant

public static void hideRedundant()
Only hide redundant labels.


hideRedundantLabels

public static void hideRedundantLabels()
Manually trigger the trigger listener.


trigger

protected Command trigger(TransactionalEditingDomain domain,
                          Notification notification)

Specified by:
trigger in class TriggerListener