public interface ITwoWayDiff extends IDiff
IResourceDelta
but is simplified.IDiffTree
TwoWayDiff
Modifier and Type | Field and Description |
---|---|
static int |
CONTENT
Change constant (bit mask) indicating that the content of the object has changed.
|
static int |
COPY_FROM
Change constant (bit mask) indicating that the object was copied from another location.
|
static int |
MOVE_FROM
Change constant (bit mask) indicating that the object was moved from another location.
|
static int |
MOVE_TO
Change constant (bit mask) indicating that the object was moved to another location.
|
static int |
REPLACE
Change constant (bit mask) indicating that the object has been
replaced by another at the same location (i.e., the object has
been deleted and then added).
|
Modifier and Type | Method and Description |
---|---|
int |
getFlags()
Returns flags which describe in more detail how a object has been affected.
|
IPath |
getFromPath()
Returns the full path (in the "before" state) from which this resource
(in the "after" state) was moved.
|
IPath |
getToPath()
Returns the full path (in the "after" state) to which this resource
(in the "before" state) was moved.
|
getKind, getPath, toDiffString
static final int CONTENT
getFlags()
,
Constant Field Valuesstatic final int MOVE_FROM
getFromPath()
.getFlags()
,
Constant Field Valuesstatic final int MOVE_TO
getToPath()
.getFlags()
,
Constant Field Valuesstatic final int COPY_FROM
getFromPath()
.getFlags()
,
Constant Field Valuesstatic final int REPLACE
getFlags()
,
Constant Field Valuesint getFlags()
The following codes (bit masks) are used when kind is CHANGE
, and
also when the object is involved in a move:
CONTENT
- The bytes contained by the resource have
been altered.REPLACE
- The object
was deleted (either by a delete or move), and was subsequently re-created
(either by a create, move, or copy).REMOVE
(or CHANGE
in conjunction with REPLACE
):
MOVE_TO
- The object has moved.
getToPath
will return the path of where it was moved to.ADD
(or CHANGE
in conjunction with REPLACE
):
MOVE_FROM
- The object has moved.
getFromPath
will return the path of where it was moved from.COPY_FROM
- The object has copied.
getFromPath
will return the path of where it was copied from.REMOVE
, with flag MOVE_TO
,
and getToPath
on A will return the path for B.
B will have kind ADD
, with flag MOVE_FROM
,
and getFromPath
on B will return the path for A.
B's other flags will describe any other changes to the resource, as compared
to its previous location at A.
Note that the move flags only describe the changes to a single object; they don't necessarily imply anything about the parent or children of the object. If the children were moved as a consequence of a subtree move operation, they will have corresponding move flags as well.
CONTENT
,
MOVE_TO
,
MOVE_FROM
,
COPY_FROM
,
REPLACE
,
IDiff.getKind()
,
getFromPath()
,
getToPath()
IPath getFromPath()
MOVE_FROM
change flag is set; otherwise,
null
is returned.
Note: the returned path never has a trailing separator.
null
getToPath()
,
IDiff.getPath()
,
getFlags()
IPath getToPath()
MOVE_TO
change flag is set; otherwise,
null
is returned.
Note: the returned path never has a trailing separator.
null
getFromPath()
,
IDiff.getPath()
,
getFlags()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.