Class ResourceDiffTree
java.lang.Object
org.eclipse.team.core.diff.provider.DiffTree
org.eclipse.team.core.mapping.provider.ResourceDiffTree
- All Implemented Interfaces:
IDiffTree,IResourceDiffTree
Implementation of
IResourceDiffTree.- Since:
- 3.2
- Restriction:
- This class is not intended to be subclassed by clients.
-
Field Summary
Fields inherited from class org.eclipse.team.core.diff.provider.DiffTree
START_CLIENT_PROPERTY_RANGEFields inherited from interface org.eclipse.team.core.diff.IDiffTree
P_BUSY_HINT, P_HAS_DESCENDANT_CONFLICTS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ResourceTraversal[] traversals, IDiffVisitor visitor) Visit all diffs in this tree that are covered by the given traversals.voidAdd the givenIDiffto the tree.Return all resources that contain diffs in this diff tree.Return the diff for the given resource.IDiff[]Return all the diffs in the tree that are found for the given resource when traversed to the given depth.IDiff[]getDiffs(ResourceTraversal[] traversals) Return all the diffs in the tree that are contained in the given traversals.getResource(IDiff diff) Return the resource associated with the given diff.static IResourcegetResourceFor(IDiff node) Get the resource for the diff node that was obtained from anIResourceDiffTree.booleanhasMatchingDiffs(ResourceTraversal[] traversals, FastDiffFilter filter) Return whether the this diff tree contains any diffs that match the given filter within the given traversals.Return the members of the given resource that either have diffs in this tree of contain descendants that have diffs in this tree.voidRemove the diff associated with the given resource from the tree.Methods inherited from class org.eclipse.team.core.diff.provider.DiffTree
accept, addDiffChangeListener, beginInput, clear, clearBusy, countFor, endInput, getChildren, getDiff, getDiffs, getPaths, getProperty, hasMatchingDiffs, isEmpty, remove, removeDiffChangeListener, reportError, setBusy, setPropertyToRoot, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.team.core.diff.IDiffTree
accept, addDiffChangeListener, clearBusy, countFor, getChildren, getDiff, getProperty, hasMatchingDiffs, isEmpty, removeDiffChangeListener, setBusy, size
-
Constructor Details
-
ResourceDiffTree
public ResourceDiffTree()
-
-
Method Details
-
getResourceFor
Get the resource for the diff node that was obtained from anIResourceDiffTree.- Parameters:
node- the diff node.- Returns:
- the resource for the diff node
-
getDiff
Description copied from interface:IResourceDiffTreeReturn the diff for the given resource. This method is a convenience method that uses the path of the resource to access the diff.- Specified by:
getDiffin interfaceIResourceDiffTree- Parameters:
resource- a resource- Returns:
- the diff associated with the resource or
nullif the resource does not have any changes.
-
getResource
Description copied from interface:IResourceDiffTreeReturn the resource associated with the given diff. This method will only return meaningful results for diffs which were obtained from this tree.- Specified by:
getResourcein interfaceIResourceDiffTree- Parameters:
diff- a diff- Returns:
- the resource associated with the given diff
-
accept
Description copied from interface:IResourceDiffTreeVisit all diffs in this tree that are covered by the given traversals.- Specified by:
acceptin interfaceIResourceDiffTree- Parameters:
traversals- the set of traversals whose diffs are to be visitedvisitor- a diff visitor
-
getDiffs
Description copied from interface:IResourceDiffTreeReturn all the diffs in the tree that are contained in the given traversals.- Specified by:
getDiffsin interfaceIResourceDiffTree- Parameters:
traversals- the traversals- Returns:
- all the diffs in the tree that are contained in the given traversals
-
getDiffs
Description copied from interface:IResourceDiffTreeReturn all the diffs in the tree that are found for the given resource when traversed to the given depth.- Specified by:
getDiffsin interfaceIResourceDiffTree- Parameters:
resource- the resourcedepth- the depth- Returns:
- all the diffs in the tree that are found for the given resource when traversed to the given depth
-
members
Description copied from interface:IResourceDiffTreeReturn the members of the given resource that either have diffs in this tree of contain descendants that have diffs in this tree.- Specified by:
membersin interfaceIResourceDiffTree- Parameters:
resource- a resource- Returns:
- the members of the given resource that either have diffs in this tree of contain descendants that have diffs in this tree
-
getAffectedResources
Description copied from interface:IResourceDiffTreeReturn all resources that contain diffs in this diff tree.- Specified by:
getAffectedResourcesin interfaceIResourceDiffTree- Returns:
- all resources that contain diffs in this diff tree
-
add
Description copied from class:DiffTreeAdd the givenIDiffto the tree. A change event will be generated unless the call to this method is nested in between calls tobeginInput()andendInput(IProgressMonitor)in which case the event for this addition and any other sync set change will be fired in a batched event whenendInputis invoked.Invoking this method outside of the above mentioned block will result in the
endInput(IProgressMonitor)being invoked with a null progress monitor. If responsiveness is required, the client should always nest sync set modifications withinbeginInput/endInput. -
remove
Remove the diff associated with the given resource from the tree.- Parameters:
resource- the resource
-
hasMatchingDiffs
Description copied from interface:IResourceDiffTreeReturn whether the this diff tree contains any diffs that match the given filter within the given traversals.- Specified by:
hasMatchingDiffsin interfaceIResourceDiffTree- Parameters:
traversals- the traversalsfilter- the diff node filter- Returns:
- whether the given diff tree contains any deltas that match the given filter
-