Deltas have a different status depending on the kind of change they represent. The list below summarizes each status (as returned by getKind
) and its meaning (see individual constants for a more detailled description):
ADDED
- The element described by the delta has been added.REMOVED
- The element described by the delta has been removed.CHANGED
- The element described by the delta has been changed in some way. Specification of the type of change is provided by getFlags
which returns the following values: F_ADDED_TO_CLASSPATH
- A classpath entry corresponding to the element has been added to the project's classpath. This flag is only valid if the element is an IPackageFragmentRoot
.F_CHILDREN
- A child of the element has changed in some way. This flag is only valid if the element is an IErlElement
.F_CLASSPATH_REORDER
- A classpath entry corresponding to the element has changed position in the project's classpath. This flag is only valid if the element is an IPackageFragmentRoot
.F_CLOSED
- The underlying IProject
has been closed. This flag is only valid if the element is an IErlProject
.F_CONTENT
- The contents of the element have been altered. This flag is only valid for elements which correspond to files.F_FINE_GRAINED
- The delta is a fine-grained delta, that is, an analysis down to the members level was done to determine if there were structural changes to members of the element.F_OPENED
- The underlying IProject
has been opened. This flag is only valid if the element is an IErlProject
.F_REMOVED_FROM_CLASSPATH
- A classpath entry corresponding to the element has been removed from the project's classpath. This flag is only valid if the element is an IPackageFragmentRoot
. Move operations are indicated by other change flags, layered on top of the change flags described above. If element A is moved to become B, the delta for the change in A will have status REMOVED
, with change flag F_MOVED_TO
. In this case, getMovedToElement
on delta A will return the handle for B. The delta for B will have status ADDED
, with change flag F_MOVED_FROM
, and getMovedFromElement
on delta B will return the handle for A. (Note, the handle to A in this case represents an element that no longer exists).
Note that the move change flags only describe the changes to a single element, they do not imply anything about the parent or children of the element.
The F_ADDED_TO_CLASSPATH
,F_REMOVED_FROM_CLASSPATH
and F_CLASSPATH_REORDER
flags are triggered by changes to a project's classpath. They do not mean that the underlying resource was added, removed or changed. For example, if a project P already contains a folder src, then adding a classpath entry with the 'P/src' path to the project's classpath will result in an IErlElementDelta
with the F_ADDED_TO_CLASSPATH
flag for the IPackageFragmentRoot
P/src. On the contrary, if a resource is physically added, removed or changed and this resource corresponds to a classpath entry of the project, then an IErlElementDelta
with the ADDED
, REMOVED
, or CHANGED
kind will be fired.
No assumptions should be made on whether the erlang element delta tree is rooted at the IErlModel
level or not.
IErlElementDelta
object are not valid outside the dynamic scope of the notification.
@noimplement This interface is not intended to be implemented by clients.
|
|
|
|
|
|
|
|
|
|
|
|
|
|