Returns flags which describe in more detail how a resource has been affected.
The following codes (bit masks) are used when kind is CHANGED
, and
also when the resource is involved in a move:
CONTENT
- The bytes contained by the resource have
been altered, or IResource.touch
has been called on
the resource.
DERIVED_CHANGED
- The derived flag of the resource has
been altered.
ENCODING
- The encoding of the resource may have been altered.
This flag is not set when the encoding changes due to the file being modified,
or being moved.
DESCRIPTION
- The description of the project has been altered,
or IResource.touch
has been called on the project.
This flag is only valid for project resources.
OPEN
- The project's open/closed state has changed.
If it is not open, it was closed, and vice versa. This flag is only valid for project resources.
TYPE
- The resource (a folder or file) has changed its type.
SYNC
- The resource's sync status has changed.
MARKERS
- The resource's markers have changed.
REPLACED
- The resource (and all its properties)
was deleted (either by a delete or move), and was subsequently re-created
(either by a create, move, or copy).
LOCAL_CHANGED
- The resource is a linked resource,
and the underlying file system object has been added or removed.
The following code is only used if kind is
REMOVED
(or
CHANGED
in conjunction with
REPLACED
):
MOVED_TO
- The resource has moved.
getMovedToPath
will return the path of where it was moved to.
The following code is only used if kind is
ADDED
(or
CHANGED
in conjunction with
REPLACED
):
MOVED_FROM
- The resource has moved.
getMovedFromPath
will return the path of where it was moved from.
The following code is only used when describing potential changes using an
IResourceChangeDescriptionFactory:
COPIED_FROM
- Change constant (bit mask) indicating that the resource was copied from another location.
The location in the "before" state can be retrieved using getMovedFromPath()
.
A simple move operation would result in the following delta information.
If a resource is moved from A to B (with no other changes to A or B),
then A will have kind
REMOVED
, with flag
MOVED_TO
,
and
getMovedToPath
on A will return the path for B.
B will have kind
ADDED
, with flag
MOVED_FROM
,
and
getMovedFromPath
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 resource; they
don't necessarily imply anything about the parent or children of the resource.
If the children were moved as a consequence of a subtree move operation,
they will have corresponding move flags as well.
Note that it is possible for a file resource to be replaced in the workspace
by a folder resource (or the other way around).
The resource delta, which is actually expressed in terms of
paths instead or resources, shows this as a change to either the
content or children.