Interface IElementDeltaExtension
-
- All Superinterfaces:
IElementDelta
public interface IElementDeltaExtension extends IElementDelta
Model implementors may opt to extend this interface, which extendsIElementDeltawith a number of default methods.This interface is not intended to be referenced for purposes other than extension.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default IElementDelta[]getAddedChildren()Returns element deltas for the immediate children that have been added.default IElementDelta[]getAffectedChildren()Returns element deltas for all affected (added, removed, or changed) immediate children.default IElementDelta[]getChangedChildren()Returns element deltas for the immediate children that have been changed.default IElementgetElement()Returns the element that this delta describes a change to.default longgetFlags()Returns flags which describe in more detail how an element has changed.default intgetKind()Returns the kind of this element delta.default org.eclipse.core.resources.IMarkerDelta[]getMarkerDeltas()Returns the changes to markers on the corresponding resource of this delta's element.default IElementgetMovedFromElement()Returns an element describing this delta's element before it was moved to its current location, ornullif theF_MOVED_FROMchange flag is not set.default IElementgetMovedToElement()Returns an element describing this delta's element in its new location, ornullif theF_MOVED_TOchange flag is not set.default IElementDelta[]getRemovedChildren()Returns element deltas for the immediate children that have been removed.default 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.default booleanisEmpty()Returns whether this element delta is empty, i.e., represents an unchanged element.
-
-
-
Method Detail
-
getElement
default 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:
trueif this delta is empty, andfalseotherwise
-
getKind
default int getKind()
Returns the kind of this element delta. Normally, one ofADDED,REMOVED, orCHANGED. ReturnsNO_CHANGEif, and only if, the delta is empty.- Returns:
- the kind of this element delta
-
getFlags
default 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 << 32and includes the upper 32 bits of thelongvalue. 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
-
getAffectedChildren
default 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
default 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
default 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
default 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
default IElement getMovedFromElement()
Returns an element describing this delta's element before it was moved to its current location, ornullif theF_MOVED_FROMchange flag is not set.- Returns:
- an element describing this delta's element before it was moved
to its current location, or
nullif theF_MOVED_FROMchange flag is not set - See Also:
getMovedToElement(),getFlags()
-
getMovedToElement
default IElement getMovedToElement()
Returns an element describing this delta's element in its new location, ornullif theF_MOVED_TOchange flag is not set.- Returns:
- an element describing this delta's element in its new location,
or
nullif theF_MOVED_TOchange flag is not set - See Also:
getMovedFromElement(),getFlags()
-
getMarkerDeltas
default org.eclipse.core.resources.IMarkerDelta[] getMarkerDeltas()
Returns the changes to markers on the corresponding resource of this delta's element.Returns
nullif 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.resourcesbundle 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
nullif none. Clients must not modify the returned array.
-
getResourceDeltas
default 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
nullif 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.resourcesbundle 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
nullif none. Clients must not modify the returned array.
-
-