Class SinkEvent

All Implemented Interfaces:
IPostEventProcessing
Direct Known Subclasses:
AssetEvent, JavaClassEvent, JavaMethodEvent, ParentCnrAddedEvent, ParentCnrMoveEvent, ParentCnrNameEvent, ProjectNameEvent, PropCnrFocusEvent, QueryDesignerPropEvent, RefreshEvent, VSReferenceEvent

public abstract class SinkEvent extends GEvent
Abstract class extending the base GEvent to set the event propagation to sinking, i.e. events send from parent to children. Note that sinking events can have a big impact on performance for large property trees.

Sinking events are typically used when a parent wishes to inform children of something, or by means of a "messaging system" to let e.g. an event collect information from potential event listeners, a good example would be QueryReferencesEvent, and ResolveReferencesEvent.

Author:
Christopher Mindus
  • Constructor Details

    • SinkEvent

      public SinkEvent(GProp<?> source, int eventID, boolean isRemoteInduced)
      Constructs the generic sink event with specified originator without progress monitor.
      Parameters:
      source - The source object.
      eventID - The event ID, see GEvent.PROP_*.
      isRemoteInduced - Flag indicating this change is induced from a remote party.
      Throws:
      NullPointerException - If source is null.
    • SinkEvent

      public SinkEvent(GProp<?> source, int eventID, IPropProgressMonitor monitor)
      Constructs the generic event sink with specified originator that has a progress monitor and is not remote induced.
      Parameters:
      source - The source object.
      eventID - The event ID, see GEvent.PROP_*.
      monitor - The progress monitor, null for none.
      Throws:
      NullPointerException - If souce is null.
  • Method Details

    • getOperations

      public GEvent.Operation[] getOperations()
      Gets the Operations order describing what Operation the property that receives the event should process. This Operations order defines that the event will be sinking, i.e. sent from parent to children.

      The event Operations in order are: SELF, LISTENERS, CHILDREN.

      Specified by:
      getOperations in class GEvent
      Returns:
      The order of the Operations, per Event-implementing class dependent, normally a static final array.