Class ResolveReferencesEvent

All Implemented Interfaces:

public class ResolveReferencesEvent extends GEvent
Event used to resolve references in a broadcast event sent to all properties from the root container.

This event is not passed the normal event channel, it is sent directly to the property. Property containers call all its children with this event using GProp.onReferenceEvent(ResolveReferencesEvent).

Two events are sent with the same event ID, but with different options, the first one is sent in the order of: SELF, LISTENER, CHILDREN. To check if it's the first event, verify that isPostResolving() is false. This event makes sure that a property performs its own reference resolving before passing it on further down to its children. It is e.g. used to handle the VSReference property for a Web Service, followed by VSRelativeReference in the Web Service children properties. In this case it is important that VSReference is resolved before VSRelativeReference.

The second event has the flag returned by isPostResolving() set to true. The event order is: CHILDREN, LISTENER, SELF. It gives the property an opportunity to collect results from the resolve process of its children in order to e.g. create error markers in Eclipse for resources.


Christopher Mindus
  • Constructor Details

    • ResolveReferencesEvent

      public ResolveReferencesEvent(PropCnr root, boolean doReCheck, boolean isPostResolving)
      Constructs a new Resolve References event with the specified isPostResolving flag.
      root - The root property.
      isPostResolving - Flag indicating this change is induced from a remote party.
      NullPointerException - If monitor 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, CHILDREN for both pre- and post-resolving.

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

      public boolean isPostResolving()
      Checks if event is a post-reference resolve event flavor, i.e. the second of the two events fired when resolving references.
    • doReCheck

      public boolean doReCheck()
      Gets the flag to force a re-check of the reference, even resolved ones.
    • newSource

      public ResolveReferencesEvent newSource(PropCnr source)
      Creates a new event like this one, but with a new source.
      source - The new source.
      A new ResolveReferencesEvent instance.
    • paramString

      protected StringBuilder paramString(StringBuilder buf)
      Returns the parameter string representing the state of this event. This string is useful for debugging. Super classes adds extra information to the string by preceding it with a comma followed by the extra information.
      paramString in class GEvent
      buf - The StringBuilder to append the string to.
      The StringBuilder, i.e. the buf input parameter.