public class ResourceDiffTree extends DiffTree implements IResourceDiffTree
IResourceDiffTree
.START_CLIENT_PROPERTY_RANGE
P_BUSY_HINT, P_HAS_DESCENDANT_CONFLICTS
Constructor and Description |
---|
ResourceDiffTree() |
Modifier and Type | Method and Description |
---|---|
void |
accept(ResourceTraversal[] traversals,
IDiffVisitor visitor)
Visit all diffs in this tree that are covered by the given traversals.
|
void |
add(IDiff delta)
Add the given
IDiff to the tree. |
IResource[] |
getAffectedResources()
Return all resources that contain diffs in this
diff tree.
|
IDiff |
getDiff(IResource resource)
Return the diff for the given resource.
|
IDiff[] |
getDiffs(IResource resource,
int depth)
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.
|
IResource |
getResource(IDiff diff)
Return the resource associated with the given diff.
|
static IResource |
getResourceFor(IDiff node)
Get the resource for the diff node that was obtained from an
IResourceDiffTree . |
boolean |
hasMatchingDiffs(ResourceTraversal[] traversals,
FastDiffFilter filter)
Return whether the this diff tree contains any diffs that match the given filter
within the given traversals.
|
IResource[] |
members(IResource resource)
Return the members of the given resource that either have diffs in this
tree of contain descendants that have diffs in this tree.
|
void |
remove(IResource resource)
Remove the diff associated with the given resource from
the tree.
|
accept, addDiffChangeListener, beginInput, clear, clearBusy, countFor, endInput, getChildren, getDiff, getDiffs, getPaths, getProperty, hasMatchingDiffs, isEmpty, remove, removeDiffChangeListener, reportError, setBusy, setPropertyToRoot, size
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, addDiffChangeListener, clearBusy, countFor, getChildren, getDiff, getProperty, hasMatchingDiffs, isEmpty, removeDiffChangeListener, setBusy, size
public static IResource getResourceFor(IDiff node)
IResourceDiffTree
.node
- the diff node.public IDiff getDiff(IResource resource)
IResourceDiffTree
getDiff
in interface IResourceDiffTree
resource
- a resourcenull
if
the resource does not have any changes.public IResource getResource(IDiff diff)
IResourceDiffTree
getResource
in interface IResourceDiffTree
diff
- a diffpublic void accept(ResourceTraversal[] traversals, IDiffVisitor visitor)
IResourceDiffTree
accept
in interface IResourceDiffTree
traversals
- the set of traversals whose diffs are to be visitedvisitor
- a diff visitorpublic IDiff[] getDiffs(ResourceTraversal[] traversals)
IResourceDiffTree
getDiffs
in interface IResourceDiffTree
traversals
- the traversalspublic IDiff[] getDiffs(IResource resource, int depth)
IResourceDiffTree
getDiffs
in interface IResourceDiffTree
resource
- the resourcedepth
- the depthpublic IResource[] members(IResource resource)
IResourceDiffTree
members
in interface IResourceDiffTree
resource
- a resourcepublic IResource[] getAffectedResources()
IResourceDiffTree
getAffectedResources
in interface IResourceDiffTree
public void add(IDiff delta)
DiffTree
IDiff
to the tree. A change event will
be generated unless the call to this method is nested in between calls
to beginInput()
and endInput(IProgressMonitor)
in which case the event for this addition and any other sync set
change will be fired in a batched event when endInput
is 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 within beginInput/endInput
.
public void remove(IResource resource)
resource
- the resourcepublic boolean hasMatchingDiffs(ResourceTraversal[] traversals, FastDiffFilter filter)
IResourceDiffTree
hasMatchingDiffs
in interface IResourceDiffTree
traversals
- the traversalsfilter
- the diff node filter
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.