Package org.eclipse.xtext.resource
Interface IResourceDescription.Event.Source
-
- All Known Implementing Classes:
AbstractResourceDescriptionChangeEventSource
,DelegatingEventSource
- Enclosing interface:
- IResourceDescription.Event
public static interface IResourceDescription.Event.Source
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(IResourceDescription.Event.Listener listener)
Add a listener to the event source.void
notifyListeners(IResourceDescription.Event event)
Notify listeners about the given event.void
removeListener(IResourceDescription.Event.Listener listener)
Immediately removes a registered listener from the source.
-
-
-
Method Detail
-
addListener
void addListener(IResourceDescription.Event.Listener listener)
Add a listener to the event source. Listeners will not be added twice. Subsequent calls toaddListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)
will not affect the number of events that the listener receives.removeListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)
will remove the listener immediately independently from the number of invocations ofaddListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)
for the given listener.- Parameters:
listener
- the listener to be registered. May not benull
.
-
removeListener
void removeListener(IResourceDescription.Event.Listener listener)
Immediately removes a registered listener from the source. However ifremoveListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)
is called during a notification, the removed listener will still receive the event. If the listener has not been registered before, theremoveListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)
does nothing.- Parameters:
listener
- the listener to be removed. May not benull
.
-
notifyListeners
void notifyListeners(IResourceDescription.Event event)
Notify listeners about the given event.
- Parameters:
event
- the fired event. My not benull
.- Since:
- 2.5
-
-