Skip navigation links
oracle.jdeveloper.java.provider
Class JdevProviderContext.NodeObserver
java.lang.Object
oracle.ide.model.NodeListener
oracle.jdeveloper.java.provider.JdevProviderContext.NodeObserver
- Enclosing class:
- JdevProviderContext
-
protected class JdevProviderContext.NodeObserver
- extends NodeListener
The NodeObserver attaches to nodes for which we have created SourceFile instances for, and tracks the given node until the node is closed, or renamed. This observer will take care of expiring the SourceFile for the given URL when these events * occur, or when the node is modified or reloaded.
Method Summary |
void |
nodeClosed(NodeEvent event)
Called after a Node has been closed. |
void |
nodeRenamed(NodeEvent event, java.net.URL oldURL, java.net.URL newURL)
Called after a Node has been renamed and recached under the new URL in the NodeFactory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JdevProviderContext.NodeObserver
protected JdevProviderContext.NodeObserver(Node node,
java.net.URL sourceURL)
nodeClosed
public void nodeClosed(NodeEvent event)
- Description copied from class:
NodeListener
- Called after a Node has been closed.
-
- Overrides:
nodeClosed
in class NodeListener
-
- Parameters:
event
- the object containing information about this event
nodeRenamed
public void nodeRenamed(NodeEvent event,
java.net.URL oldURL,
java.net.URL newURL)
- Description copied from class:
NodeListener
- Called after a Node has been renamed and recached under the new URL in the NodeFactory.
-
- Overrides:
nodeRenamed
in class NodeListener
-
- Parameters:
event
- the object containing information about this event. Calling e.getNode()
will return the old Node
. To get the new Node, call NodeFactory.find(newURL)
. Both old and new Nodes remain available while NodeListeners are being called with the nodeRenamed event. In the case where renaming did not cause the Node type to change, both old Node and new Node will be the exact same object, so using the oldURL
parameter is the only reliable way to know the URL of the Node before it was renamed. If the Node type did change, the old Node is removed from the NodeFactory cache immediately after all NodeListeners have been called with the nodeRenamed event.
oldURL
- the old URL of the Node before the rename
newURL
- the new URL of the Node after the rename
Skip navigation links
Copyright © 1997, 2015, Oracle. All rights reserved.