public final class ContextWatcher extends java.lang.Object implements Observer, WeakDataHolder
ContextHolder references are held as WeakDataReference and thus need not worry about dangling references.
If the Context of a ContextHolder is changed for any reason other than a notification from ContextWatcher, then the ContextHolder should call stopWatching passing in the old Context, then call startWatching again using the new Context.
| Modifier and Type | Method and Description | 
|---|---|
void | 
dataExpired(WeakDataReference data)
Deprecated.  
A weakly referenced ContextHolder has been garbage collected. 
 | 
boolean | 
isExpired()
Deprecated.  
Ignored by this implementation. 
 | 
static void | 
startWatching(ContextHolder holder)
Deprecated.  
Start watching the Context held by the given ContextHolder. 
 | 
static void | 
stopWatching(ContextHolder holder)
Deprecated.  
Stop watching the Context held by the given ContextHolder. 
 | 
void | 
update(java.lang.Object observed, UpdateMessage change)
Deprecated.  
Respond to a name change message for any of the Context's Node, Project or Workspace, and to a child removed message removing the Node from the Project, the Project from the Workspace or the Workspace from the Ide workspaces. 
 | 
public static void startWatching(ContextHolder holder)
holder - the ContextHolder whose Context is to be monitored.public static void stopWatching(ContextHolder holder)
holder - the ContextHolder whose Context is to no longer be watched.public void dataExpired(WeakDataReference data)
dataExpired in interface WeakDataHolderdata - the WeakDataReference to the ContextHolder that was collected.public boolean isExpired()
isExpired in interface WeakDataHolder
public void update(java.lang.Object observed,
          UpdateMessage change)