org.eclipse.core.internal.events
Class NotificationManager

java.lang.Object
  extended by org.eclipse.core.internal.events.NotificationManager
All Implemented Interfaces:
ILifecycleListener, IManager

public class NotificationManager
extends java.lang.Object
implements IManager, ILifecycleListener


Constructor Summary
NotificationManager(Workspace workspace)
           
 
Method Summary
 void addListener(IResourceChangeListener listener, int eventMask)
           
 boolean beginAvoidNotify()
          Indicates the beginning of a block where periodic notifications should be avoided.
 void beginNotify()
          Signals the beginning of the notification phase at the end of a top level operation.
 void broadcastChanges(ElementTree lastState, ResourceChangeEvent event, boolean lockTree)
          The main broadcast point for notification deltas
 void broadcastChanges(IResourceChangeListener listener, int type, IResourceDelta delta)
          Helper method for the save participant lifecycle computation.
 void endAvoidNotify()
          Indicates the end of a block where periodic notifications should be avoided.
 void handleEvent(LifecycleEvent event)
           
 void removeListener(IResourceChangeListener listener)
           
 void requestNotify()
          Requests that a periodic notification be scheduled
 boolean shouldNotify()
          Returns true if a notification is needed.
 void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationManager

public NotificationManager(Workspace workspace)
Method Detail

addListener

public void addListener(IResourceChangeListener listener,
                        int eventMask)

beginAvoidNotify

public boolean beginAvoidNotify()
Indicates the beginning of a block where periodic notifications should be avoided. Returns true if notification avoidance really started, and false for nested operations.


beginNotify

public void beginNotify()
Signals the beginning of the notification phase at the end of a top level operation.


broadcastChanges

public void broadcastChanges(ElementTree lastState,
                             ResourceChangeEvent event,
                             boolean lockTree)
The main broadcast point for notification deltas


broadcastChanges

public void broadcastChanges(IResourceChangeListener listener,
                             int type,
                             IResourceDelta delta)
Helper method for the save participant lifecycle computation.


endAvoidNotify

public void endAvoidNotify()
Indicates the end of a block where periodic notifications should be avoided.


requestNotify

public void requestNotify()
Requests that a periodic notification be scheduled


handleEvent

public void handleEvent(LifecycleEvent event)
Specified by:
handleEvent in interface ILifecycleListener

removeListener

public void removeListener(IResourceChangeListener listener)

shouldNotify

public boolean shouldNotify()
Returns true if a notification is needed. This happens if sufficient time has elapsed since the last notification

Returns:
true if a notification is needed, and false otherwise

shutdown

public void shutdown(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
shutdown in interface IManager

startup

public void startup(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
startup in interface IManager