Interface IElementDeltaImpl
- All Superinterfaces:
IElementDelta
- All Known Implementing Classes:
ElementDelta
IElementDelta
s must implement this interface.- Restriction:
- This interface is not intended to be extended by clients.
-
Method Summary
Modifier and TypeMethodDescriptiondefault IElementDelta
findDelta_
(IElement element) Finds and returns the delta for the given element in this delta subtree (subtree root included), ornull
if no such delta can be found.Returns element deltas for the immediate children that have been added.Returns element deltas for all affected (added, removed, or changed) immediate children.Returns element deltas for the immediate children that have been changed.Returns the element that this delta describes a change to.long
Returns flags which describe in more detail how an element has changed.int
getKind_()
Returns the kind of this element delta.org.eclipse.core.resources.IMarkerDelta[]
Returns the changes to markers on the corresponding resource of this delta's element.Returns an element describing this delta's element before it was moved to its current location, ornull
if theF_MOVED_FROM
change flag is not set.Returns an element describing this delta's element in its new location, ornull
if theF_MOVED_TO
change flag is not set.Returns element deltas for the immediate children that have been removed.org.eclipse.core.resources.IResourceDelta[]
Returns the changes to children of the element's corresponding resource that cannot be described in terms of element deltas.default boolean
isEmpty_()
Returns whether this element delta is empty, i.e., represents an unchanged element.Returns a string representation of this element delta in a form suitable for debugging purposes.
-
Method Details
-
getElement_
IElement getElement_()Returns the element that this delta describes a change to.- Returns:
- the element that this delta describes a change to
(never
null
)
-
isEmpty_
default boolean isEmpty_()Returns whether this element delta is empty, i.e., represents an unchanged element.- Returns:
true
if this element delta is empty, andfalse
otherwise
-
getKind_
int getKind_()Returns the kind of this element delta. Normally, one ofADDED
,REMOVED
, orCHANGED
. ReturnsNO_CHANGE
if, and only if, the delta is empty.- Returns:
- the kind of this element delta
-
getFlags_
long getFlags_()Returns flags which describe in more detail how an element has changed. Such flags should be tested using the&
operator. For example:if ((flags & F_CONTENT) != 0) // a content change
Some change flags make sense for most models and are predefined in
IElementDeltaConstants
, while others are model-specific and are defined by the model implementor. The range for model-specific change flags starts from1L << 32
and includes the upper 32 bits of thelong
value. The lower 32 bits are reserved for predefined generic change flags.Move operations are indicated by special change flags. If an element is moved from A to B (with no other changes to A or B), then A will have kind
REMOVED
, with flagF_MOVED_TO
, andgetMovedToElement_()
on A will return the handle for B. B will have kindADDED
, with flagF_MOVED_FROM
, andgetMovedFromElement_()
on B will return the handle for A. (Note that the handle for A in this case represents an element that no longer exists.)- Returns:
- flags that describe how an element has changed
-
findDelta_
Finds and returns the delta for the given element in this delta subtree (subtree root included), ornull
if no such delta can be found.This is a convenience method to avoid manual traversal of the delta tree in cases where the listener is only interested in changes to particular elements. Calling this method will generally be faster than manually traversing the delta to a particular descendant.
- Parameters:
element
- the element of the desired delta (may benull
, in which casenull
will be returned)- Returns:
- the delta for the given element, or
null
if no such delta can be found
-
getAffectedChildren_
IElementDelta[] getAffectedChildren_()Returns element deltas for all affected (added, removed, or changed) immediate children.- Returns:
- element deltas for all affected immediate children
(never
null
). Clients must not modify the returned array.
-
getAddedChildren_
IElementDelta[] getAddedChildren_()Returns element deltas for the immediate children that have been added.- Returns:
- element deltas for the immediate children that have been added
(never
null
). Clients must not modify the returned array.
-
getRemovedChildren_
IElementDelta[] getRemovedChildren_()Returns element deltas for the immediate children that have been removed.- Returns:
- element deltas for the immediate children that have been removed
(never
null
). Clients must not modify the returned array.
-
getChangedChildren_
IElementDelta[] getChangedChildren_()Returns element deltas for the immediate children that have been changed.- Returns:
- element deltas for the immediate children that have been changed
(never
null
). Clients must not modify the returned array.
-
getMovedFromElement_
IElement getMovedFromElement_()Returns an element describing this delta's element before it was moved to its current location, ornull
if theF_MOVED_FROM
change flag is not set.- Returns:
- an element describing this delta's element before it was moved
to its current location, or
null
if theF_MOVED_FROM
change flag is not set - See Also:
-
getMovedToElement_
IElement getMovedToElement_()Returns an element describing this delta's element in its new location, ornull
if theF_MOVED_TO
change flag is not set.- Returns:
- an element describing this delta's element in its new location,
or
null
if theF_MOVED_TO
change flag is not set - See Also:
-
getMarkerDeltas_
org.eclipse.core.resources.IMarkerDelta[] getMarkerDeltas_()Returns the changes to markers on the corresponding resource of this delta's element.Returns
null
if no markers changed. Note that this is an exception to the general convention of returning an empty array rather thannull
. This makes the method safe to call even whenorg.eclipse.core.resources
bundle is not available.Note that marker deltas, like element deltas, are generally only valid for the dynamic scope of change notification. Clients must not hang on to these objects.
- Returns:
- the marker deltas, or
null
if none. Clients must not modify the returned array.
-
getResourceDeltas_
org.eclipse.core.resources.IResourceDelta[] getResourceDeltas_()Returns the changes to children of the element's corresponding resource that cannot be described in terms of element deltas.Returns
null
if there were no such changes. Note that this is an exception to the general convention of returning an empty array rather thannull
. This makes the method safe to call even whenorg.eclipse.core.resources
bundle is not available.Note that resource deltas, like element deltas, are generally only valid for the dynamic scope of change notification. Clients must not hang on to these objects.
- Returns:
- the resource deltas, or
null
if none. Clients must not modify the returned array.
-
toString_
Returns a string representation of this element delta in a form suitable for debugging purposes. Clients can influence the result with format options specified in the given context; unrecognized options are ignored and an empty context is permitted.Implementations are encouraged to support common options defined in
ToStringOptions
and interpret theFORMAT_STYLE
as follows:- Parameters:
context
- notnull
- Returns:
- a string representation of this element delta
(never
null
)
-