public interface IDiffTree
IDiff
instances. For
efficiency reasons, the tree only provides diffs for paths that represent a
change. Paths that do not contain a diff represent but are returned from the
tree will contain child paths in the set.Modifier and Type | Field and Description |
---|---|
static int |
P_BUSY_HINT
Property constant used to indicate that a particular path may be involved in an operation.
|
static int |
P_HAS_DESCENDANT_CONFLICTS
Property constant used to indicate that a particular path has descendants that are conflicts.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IPath path,
IDiffVisitor visitor,
int depth)
Accepts the given visitor.
|
void |
addDiffChangeListener(IDiffChangeListener listener)
Add a listener to the tree.
|
void |
clearBusy(IProgressMonitor monitor)
Clear all busy properties in this tree.
|
long |
countFor(int state,
int mask)
Return the number of out-of-sync elements in the given set whose synchronization
state matches the given mask.
|
IPath[] |
getChildren(IPath parent)
Returns the child paths of the given path that either point to
a sync delta or have a descendant path that points to a sync delta.
|
IDiff |
getDiff(IPath path)
Returns the delta identified by the given path,
or
null if there is no delta at that path. |
boolean |
getProperty(IPath path,
int property)
Return the value of the property for the given path.
|
boolean |
hasMatchingDiffs(IPath path,
FastDiffFilter filter)
Return whether the this diff tree contains any diffs that match the given filter
at of below the given path.
|
boolean |
isEmpty()
Return whether the set is empty.
|
void |
removeDiffChangeListener(IDiffChangeListener listener)
Remove the listener from the tree.
|
void |
setBusy(IDiff[] diffs,
IProgressMonitor monitor)
Set the given diff nodes and all their parents to busy
|
int |
size()
Return the number of diffs contained in the tree.
|
static final int P_BUSY_HINT
static final int P_HAS_DESCENDANT_CONFLICTS
void addDiffChangeListener(IDiffChangeListener listener)
listener
- the listener to be addedvoid removeDiffChangeListener(IDiffChangeListener listener)
listener
- the listener to be removedvoid accept(IPath path, IDiffVisitor visitor, int depth)
ADDED
, REMOVED
, and CHANGED
.
The visitor's visit
method is called with the given delta
if applicable. If the visitor returns true
, any of the
delta's children in this tree are also visited.path
- the path to start the visit in the treevisitor
- the visitordepth
- the depth to visitIDiffVisitor.visit(IDiff)
IDiff getDiff(IPath path)
null
if there is no delta at that path. The supplied path
may be absolute or relative; in either case, it is interpreted as
relative to the workspace. Trailing separators are ignored.
This method only returns a delta if there is a change at the given
path. To know if there are deltas in descendent paths, clients
should class getChildren(IPath)
.
path
- the path of the desired deltanull
if no such
delta existsIPath[] getChildren(IPath parent)
int size()
boolean isEmpty()
long countFor(int state, int mask)
For example, this will return the number of outgoing changes in the set:
long outgoing = countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
state
- the sync statemask
- the sync state maskvoid setBusy(IDiff[] diffs, IProgressMonitor monitor)
diffs
- the busy diffsmonitor
- a progress monitor or null
if progress indication
is not requiredboolean getProperty(IPath path, int property)
path
- the pathproperty
- the propertyvoid clearBusy(IProgressMonitor monitor)
monitor
- a progress monitor or null
if progress indication
is not requiredboolean hasMatchingDiffs(IPath path, FastDiffFilter filter)
path
- the pathfilter
- the diff node filter
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.