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.
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Status constant indicating that the element has been added.static final int
Status constant indicating that the element has been changed, as described by the change flags.static final int
A pathEntry Library was added for this resourcestatic final int
A source entry added for this resource.static final int
Change in the binary Parser.static final int
A pathEntry Include was added for this resourcestatic final int
A pathEntry Macro was added for this resourcestatic final int
A pathEntry Project was added to the project.static final int
Change flag indicating that there are changes to the children of the element.static final int
Change flag indicating that the underlyingIProject
has been closed.static final int
Change flag indicating that the content of the element has changed.static final int
Change in the binary Parser.static final int
Change flag indicating that this is a fine-grained delta, i.e.static final int
Change flag indicating that the modifiers of the element have changed.static final int
Change flag indicating that the element was moved from another location.static final int
Change flag indicating that the element was moved to another location.static final int
Change flag indicating that the underlyingIProject
has been opened.static final int
Reordering of the path entries.static final int
A pathEntry Library was added for this resourcestatic final int
A source entry was remove for this resource.static final int
Change flag indicating that the element has changed position relatively to its siblings.static final int
Change flag indicating that a source jar has been attached to a binary jar.static final int
Change flag indicating that a source jar has been detached to a binary jar.static final int
Status constant indicating that the element has been removed. -
Method Summary
Modifier and TypeMethodDescriptionReturns deltas for the children that have been added.Returns deltas for the affected (added, removed, or changed) children.Returns deltas for the children which have changed.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 ofADDED
,REMOVED
, orCHANGED
.Returns an element describing this element before it was moved to its current location, ornull
if theF_MOVED_FROM
change flag is not set.Returns an element describing this element in its new location, ornull
if theF_MOVED_TO
change flag is not set.Returns deltas for the children which have been removed.org.eclipse.core.resources.IResourceDelta[]
Returns the collection of resource deltas.
-
Field Details
-
ADDED
static final int ADDEDStatus constant indicating that the element has been added.- See Also:
-
REMOVED
static final int REMOVEDStatus constant indicating that the element has been removed.- See Also:
-
CHANGED
static final int CHANGEDStatus constant indicating that the element has been changed, as described by the change flags.- See Also:
-
F_CONTENT
static final int F_CONTENTChange flag indicating that the content of the element has changed.- See Also:
-
F_MODIFIERS
static final int F_MODIFIERSChange flag indicating that the modifiers of the element have changed.- See Also:
-
F_CHILDREN
static final int F_CHILDRENChange flag indicating that there are changes to the children of the element.- See Also:
-
F_MOVED_FROM
static final int F_MOVED_FROMChange flag indicating that the element was moved from another location. The location of the old element can be retrieved usinggetMovedFromElement
.- See Also:
-
F_MOVED_TO
static final int F_MOVED_TOChange flag indicating that the element was moved to another location. The location of the new element can be retrieved usinggetMovedToElement
.- See Also:
-
F_REORDER
static final int F_REORDERChange flag indicating that the element has changed position relatively to its siblings. If the element is anIPackageFragmentRoot
, a classpath entry corresponding to the element has changed position in the project's classpath.- Since:
- 2.1
- See Also:
-
F_OPENED
static final int F_OPENEDChange flag indicating that the underlyingIProject
has been opened.- See Also:
-
F_CLOSED
static final int F_CLOSEDChange flag indicating that the underlyingIProject
has been closed.- See Also:
-
F_ADDED_PATHENTRY_SOURCE
static final int F_ADDED_PATHENTRY_SOURCEA source entry added for this resource.- See Also:
-
F_REMOVED_PATHENTRY_SOURCE
static final int F_REMOVED_PATHENTRY_SOURCEA source entry was remove for this resource.- See Also:
-
F_CHANGED_PATHENTRY_MACRO
static final int F_CHANGED_PATHENTRY_MACROA pathEntry Macro was added for this resource- See Also:
-
F_CHANGED_PATHENTRY_INCLUDE
static final int F_CHANGED_PATHENTRY_INCLUDEA pathEntry Include was added for this resource- See Also:
-
F_ADDED_PATHENTRY_LIBRARY
static final int F_ADDED_PATHENTRY_LIBRARYA pathEntry Library was added for this resource- See Also:
-
F_REMOVED_PATHENTRY_LIBRARY
static final int F_REMOVED_PATHENTRY_LIBRARYA pathEntry Library was added for this resource- See Also:
-
F_CHANGED_PATHENTRY_PROJECT
static final int F_CHANGED_PATHENTRY_PROJECTA pathEntry Project was added to the project.- See Also:
-
F_PATHENTRY_REORDER
static final int F_PATHENTRY_REORDERReordering of the path entries.- See Also:
-
F_SOURCEATTACHED
static final int F_SOURCEATTACHEDChange flag indicating that a source jar has been attached to a binary jar.- See Also:
-
F_SOURCEDETACHED
static final int F_SOURCEDETACHEDChange flag indicating that a source jar has been detached to a binary jar.- See Also:
-
F_FINE_GRAINED
static final int F_FINE_GRAINEDChange flag indicating that this is a fine-grained delta, i.e. an analysis down to the members level was done to determine if there were structural changes to members.- See Also:
-
F_BINARY_PARSER_CHANGED
static final int F_BINARY_PARSER_CHANGEDChange in the binary Parser.- See Also:
-
F_CONTENT_TYPE
static final int F_CONTENT_TYPEChange in the binary Parser.- See Also:
-
-
Method Details
-
getAddedChildren
ICElementDelta[] getAddedChildren()Returns deltas for the children that have been added. -
getAffectedChildren
ICElementDelta[] getAffectedChildren()Returns deltas for the affected (added, removed, or changed) children. -
getChangedChildren
ICElementDelta[] getChangedChildren()Returns deltas for the children which have changed. -
getElement
ICElement getElement()Returns the element that this delta describes a change to. -
getFlags
int getFlags()Returns flags that describe how an element has changed.- See Also:
-
getKind
int getKind()Returns the kind of this delta - one ofADDED
,REMOVED
, orCHANGED
. -
getMovedFromElement
ICElement getMovedFromElement()Returns an element describing this element before it was moved to its current location, ornull
if theF_MOVED_FROM
change flag is not set. -
getMovedToElement
ICElement getMovedToElement()Returns an element describing this element in its new location, ornull
if theF_MOVED_TO
change flag is not set. -
getRemovedChildren
ICElementDelta[] getRemovedChildren()Returns deltas for the children which have been removed. -
getResourceDeltas
org.eclipse.core.resources.IResourceDelta[] getResourceDeltas()Returns the collection of resource deltas.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.
- Returns:
- the underlying resource deltas, or
null
if none
-