|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A diff tree provides access to a tree of 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.
This interface is not intended to be implemented by clients. Clients
should use DiffTree
instead.
DiffTree
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Field Detail |
public static final int P_BUSY_HINT
public static final int P_HAS_DESCENDANT_CONFLICTS
Method Detail |
public void addDiffChangeListener(IDiffChangeListener listener)
listener
- the listener to be addedpublic void removeDiffChangeListener(IDiffChangeListener listener)
listener
- the listener to be removedpublic void 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)
public 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 delta
null
if no such
delta existspublic IPath[] getChildren(IPath parent)
public int size()
public boolean isEmpty()
public 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 mask
public void setBusy(IDiff[] diffs, IProgressMonitor monitor)
diffs
- the busy diffsmonitor
- a progress monitor or null
if progress indication
is not requiredpublic boolean getProperty(IPath path, int property)
path
- the pathproperty
- the property
public void clearBusy(IProgressMonitor monitor)
monitor
- a progress monitor or null
if progress indication
is not requiredpublic boolean hasMatchingDiffs(IPath path, FastDiffFilter filter)
path
- the pathfilter
- the diff node filter
|
Eclipse Platform Release 3.2 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.