public interface ICElementDelta
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:
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.
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.
Modifier and Type | Field and Description |
---|---|
static int |
ADDED
Status constant indicating that the element has been added.
|
static int |
CHANGED
Status constant indicating that the element has been changed,
as described by the change flags.
|
static int |
F_ADDED_PATHENTRY_LIBRARY
A pathEntry Library was added for this resource
|
static int |
F_ADDED_PATHENTRY_SOURCE
A source entry added for this resource.
|
static int |
F_BINARY_PARSER_CHANGED
Change in the binary Parser.
|
static int |
F_CHANGED_PATHENTRY_INCLUDE
A pathEntry Include was added for this resource
|
static int |
F_CHANGED_PATHENTRY_MACRO
A pathEntry Macro was added for this resource
|
static int |
F_CHANGED_PATHENTRY_PROJECT
A pathEntry Project was added to the project.
|
static int |
F_CHILDREN
Change flag indicating that there are changes to the children of the element.
|
static int |
F_CLOSED
Change flag indicating that the underlying
IProject has been
closed. |
static int |
F_CONTENT
Change flag indicating that the content of the element has changed.
|
static int |
F_CONTENT_TYPE
Change in the binary Parser.
|
static int |
F_FINE_GRAINED
Change flag indicating that this is a fine-grained delta, i.e.
|
static int |
F_MODIFIERS
Change flag indicating that the modifiers of the element have changed.
|
static int |
F_MOVED_FROM
Change flag indicating that the element was moved from another location.
|
static int |
F_MOVED_TO
Change flag indicating that the element was moved to another location.
|
static int |
F_OPENED
Change flag indicating that the underlying
IProject has been
opened. |
static int |
F_PATHENTRY_REORDER
Reordering of the path entries.
|
static int |
F_REMOVED_PATHENTRY_LIBRARY
A pathEntry Library was added for this resource
|
static int |
F_REMOVED_PATHENTRY_SOURCE
A source entry was remove for this resource.
|
static int |
F_REORDER
Change flag indicating that the element has changed position relatively to its siblings.
|
static int |
F_SOURCEATTACHED
Change flag indicating that a source jar has been attached to a binary jar.
|
static int |
F_SOURCEDETACHED
Change flag indicating that a source jar has been detached to a binary jar.
|
static int |
REMOVED
Status constant indicating that the element has been removed.
|
Modifier and Type | Method and Description |
---|---|
ICElementDelta[] |
getAddedChildren()
Returns deltas for the children that have been added.
|
ICElementDelta[] |
getAffectedChildren()
Returns deltas for the affected (added, removed, or changed) children.
|
ICElementDelta[] |
getChangedChildren()
Returns deltas for the children which have changed.
|
ICElement |
getElement()
Returns the element that this delta describes a change to.
|
int |
getFlags()
Returns flags that describe how an element has changed.
|
int |
getKind()
Returns the kind of this delta - one of
ADDED , REMOVED ,
or CHANGED . |
ICElement |
getMovedFromElement()
Returns an element describing this element before it was moved
to its current location, or
null if the
F_MOVED_FROM change flag is not set. |
ICElement |
getMovedToElement()
Returns an element describing this element in its new location,
or
null if the F_MOVED_TO change
flag is not set. |
ICElementDelta[] |
getRemovedChildren()
Returns deltas for the children which have been removed.
|
org.eclipse.core.resources.IResourceDelta[] |
getResourceDeltas()
Returns the collection of resource deltas.
|
static final int ADDED
static final int REMOVED
static final int CHANGED
static final int F_CONTENT
static final int F_MODIFIERS
static final int F_CHILDREN
static final int F_MOVED_FROM
getMovedFromElement
.static final int F_MOVED_TO
getMovedToElement
.static final int F_REORDER
IPackageFragmentRoot
, a classpath entry corresponding
to the element has changed position in the project's classpath.static final int F_OPENED
IProject
has been
opened.static final int F_CLOSED
IProject
has been
closed.static final int F_ADDED_PATHENTRY_SOURCE
static final int F_REMOVED_PATHENTRY_SOURCE
static final int F_CHANGED_PATHENTRY_MACRO
static final int F_CHANGED_PATHENTRY_INCLUDE
static final int F_ADDED_PATHENTRY_LIBRARY
static final int F_REMOVED_PATHENTRY_LIBRARY
static final int F_CHANGED_PATHENTRY_PROJECT
static final int F_PATHENTRY_REORDER
static final int F_SOURCEATTACHED
static final int F_SOURCEDETACHED
static final int F_FINE_GRAINED
static final int F_BINARY_PARSER_CHANGED
static final int F_CONTENT_TYPE
ICElementDelta[] getAddedChildren()
ICElementDelta[] getAffectedChildren()
ICElementDelta[] getChangedChildren()
ICElement getElement()
int getFlags()
F_CHILDREN
,
F_CONTENT
,
F_MODIFIERS
,
F_MOVED_FROM
,
F_MOVED_TO
int getKind()
ADDED
, REMOVED
,
or CHANGED
.ICElement getMovedFromElement()
null
if the
F_MOVED_FROM
change flag is not set.ICElement getMovedToElement()
null
if the F_MOVED_TO
change
flag is not set.ICElementDelta[] getRemovedChildren()
org.eclipse.core.resources.IResourceDelta[] getResourceDeltas()
Note that resource deltas, like C element deltas, are generally only valid for the dynamic scope of an event notification. Clients must not hang on to these objects.
null
if noneCopyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.