Package org.eclipse.xtext.resource.impl
Class AbstractResourceDescriptionChangeEventSource
- java.lang.Object
-
- org.eclipse.xtext.resource.impl.AbstractResourceDescriptionChangeEventSource
-
- All Implemented Interfaces:
IResourceDescription.Event.Source
- Direct Known Subclasses:
DelegatingEventSource
public class AbstractResourceDescriptionChangeEventSource extends java.lang.Object implements IResourceDescription.Event.Source
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractResourceDescriptionChangeEventSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(IResourceDescription.Event.Listener listener)Add a listener to the event source.voidaddListeners(java.util.Collection<IResourceDescription.Event.Listener> listeners)voidnotifyListeners(IResourceDescription.Event event)Notify listeners about the given event.voidremoveListener(IResourceDescription.Event.Listener listener)Immediately removes a registered listener from the source.voidremoveListeners(java.util.Collection<IResourceDescription.Event.Listener> listeners)
-
-
-
Method Detail
-
addListener
public void addListener(IResourceDescription.Event.Listener listener)
Description copied from interface:IResourceDescription.Event.SourceAdd a listener to the event source. Listeners will not be added twice. Subsequent calls toIResourceDescription.Event.Source.addListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)will not affect the number of events that the listener receives.IResourceDescription.Event.Source.removeListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)will remove the listener immediately independently from the number of invocations ofIResourceDescription.Event.Source.addListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)for the given listener.- Specified by:
addListenerin interfaceIResourceDescription.Event.Source- Parameters:
listener- the listener to be registered. May not benull.
-
addListeners
public void addListeners(java.util.Collection<IResourceDescription.Event.Listener> listeners)
-
removeListener
public void removeListener(IResourceDescription.Event.Listener listener)
Description copied from interface:IResourceDescription.Event.SourceImmediately removes a registered listener from the source. However ifIResourceDescription.Event.Source.removeListener(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, theIResourceDescription.Event.Source.removeListener(org.eclipse.xtext.resource.IResourceDescription.Event.Listener)does nothing.- Specified by:
removeListenerin interfaceIResourceDescription.Event.Source- Parameters:
listener- the listener to be removed. May not benull.
-
removeListeners
public void removeListeners(java.util.Collection<IResourceDescription.Event.Listener> listeners)
-
notifyListeners
public void notifyListeners(IResourceDescription.Event event)
Description copied from interface:IResourceDescription.Event.SourceNotify listeners about the given event.
- Specified by:
notifyListenersin interfaceIResourceDescription.Event.Source- Parameters:
event- the fired event. My not benull.- Since:
- 2.5
-
-