|
|||||||||
| Home >> All >> org >> eclipse >> core >> internal >> [ watson overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.core.internal.watson
Class ElementTreeDelta

java.lang.Objectorg.eclipse.core.internal.watson.ElementTreeDelta
- public class ElementTreeDelta
- extends java.lang.Object
Describes the differences between two element trees. Specifically, an ElementTreeDelta describes the changes that have been made to the tree returned by getParent() to obtain the tree returned by getElementTree(). ElementTreeDeltas are meant to be treated as light-weight query structures with a relatively short lifespan. Deltas cannot be serialized. ElementTreeDeltas support pluggable logic for delta calculation. By implementing the IElementComparator interface, the client can specify the kind of change (addition, removal, etc) to any given element based on the element's data. There are two ways of navigating ElementTreeDeltas. First, one can get a handle on an ElementDelta using the getElementDelta() method. The ElementDelta can then be queried for its children, using a filter interface called IDeltaFilter. Clients can create implementations of IDeltaFilter to navigate deltas based on various characteristics of The delta elements.
| Field Summary | |
protected IElementComparator |
comparator
|
protected org.eclipse.core.internal.dtree.DeltaDataTree |
deltaTree
|
protected ElementTree |
elementTree
|
protected ElementTree |
parent
|
protected org.eclipse.core.runtime.IPath |
rootPath
Path of the root of the subtree that this delta is for. |
| Constructor Summary | |
(package private) |
ElementTreeDelta(ElementTree parent,
ElementTree elementTree,
IElementComparator comparator)
Creates a delta describing the changes between the two given trees. |
(package private) |
ElementTreeDelta(ElementTree parent,
ElementTree elementTree,
IElementComparator comparator,
org.eclipse.core.runtime.IPath path)
Creates a delta describing the changes between the two given trees, starting at the given path. |
| Method Summary | |
void |
destroy()
Destroys this delta and drops references to all trees deltas referenced herein. |
protected ElementDelta[] |
getAffectedElements(org.eclipse.core.runtime.IPath parentID,
IDeltaFilter filter)
Returns deltas describing the children of the specified element that match the given filter query. |
(package private) org.eclipse.core.internal.dtree.DeltaDataTree |
getDeltaTree()
Returns the delta tree |
ElementDelta |
getElementDelta(org.eclipse.core.runtime.IPath key)
Returns the delta for the specified element, or null if the element is not affected in this delta. |
ElementTree |
getElementTree()
Returns the element tree which this delta describes, when its changes are applied to the parent tree. |
ElementTree |
getParent()
Returns the element tree that this delta is based on. |
protected boolean |
hasAffectedElements(org.eclipse.core.runtime.IPath parentID,
IDeltaFilter filter)
Return true if there are deltas describing affected children of the specified element. |
private void |
initialize(ElementTree parent,
ElementTree elementTree,
IElementComparator comparator)
Initializes the tree delta |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
comparator
protected IElementComparator comparator
deltaTree
protected org.eclipse.core.internal.dtree.DeltaDataTree deltaTree
elementTree
protected ElementTree elementTree
parent
protected ElementTree parent
rootPath
protected org.eclipse.core.runtime.IPath rootPath
- Path of the root of the subtree that this delta is for.
| Constructor Detail |
ElementTreeDelta
ElementTreeDelta(ElementTree parent, ElementTree elementTree, IElementComparator comparator)
- Creates a delta describing the changes between the two given trees.
ElementTreeDelta
ElementTreeDelta(ElementTree parent, ElementTree elementTree, IElementComparator comparator, org.eclipse.core.runtime.IPath path)
- Creates a delta describing the changes between the two given trees, starting
at the given path.
| Method Detail |
destroy
public void destroy()
- Destroys this delta and drops references to all trees deltas referenced herein.
getAffectedElements
protected ElementDelta[] getAffectedElements(org.eclipse.core.runtime.IPath parentID, IDeltaFilter filter)
- Returns deltas describing the children of the specified element that
match the given filter query. Must be called only when parentID
represents a changed element, not an added or removed element.
getDeltaTree
org.eclipse.core.internal.dtree.DeltaDataTree getDeltaTree()
- Returns the delta tree
getElementDelta
public ElementDelta getElementDelta(org.eclipse.core.runtime.IPath key)
- Returns the delta for the specified element, or null if the
element is not affected in this delta.
getElementTree
public ElementTree getElementTree()
- Returns the element tree which this delta describes,
when its changes are applied to the parent tree.
It is also referred to as the 'new' tree.
getParent
public ElementTree getParent()
- Returns the element tree that this delta is based on.
It is also referred to as the 'old' tree.
hasAffectedElements
protected boolean hasAffectedElements(org.eclipse.core.runtime.IPath parentID, IDeltaFilter filter)
- Return true if there are deltas describing affected children of the specified element.
Must be called only when parentID represents a changed element, not an added or removed element.
initialize
private void initialize(ElementTree parent, ElementTree elementTree, IElementComparator comparator)
- Initializes the tree delta
|
|||||||||
| Home >> All >> org >> eclipse >> core >> internal >> [ watson overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.eclipse.core.internal.watson.ElementTreeDelta