Interface ICElementDelta


public interface ICElementDelta
A C element delta describes changes in C element between two discrete points in time. Given a delta, clients can access the element that has changed, and any children that have changed.

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

    Fields
    Modifier and Type
    Field
    Description
    static 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 resource
    static 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 resource
    static final int
    A pathEntry Macro was added for this resource
    static 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 underlying IProject 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 underlying IProject has been opened.
    static final int
    Reordering of the path entries.
    static final int
    A pathEntry Library was added for this resource
    static 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 Type
    Method
    Description
    Returns 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
    Returns flags that describe how an element has changed.
    int
    Returns the kind of this delta - one of ADDED, REMOVED, or CHANGED.
    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.
    Returns an element describing this element in its new location, or null if the F_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 ADDED
      Status constant indicating that the element has been added.
      See Also:
    • REMOVED

      static final int REMOVED
      Status constant indicating that the element has been removed.
      See Also:
    • CHANGED

      static final int CHANGED
      Status constant indicating that the element has been changed, as described by the change flags.
      See Also:
    • F_CONTENT

      static final int F_CONTENT
      Change flag indicating that the content of the element has changed.
      See Also:
    • F_MODIFIERS

      static final int F_MODIFIERS
      Change flag indicating that the modifiers of the element have changed.
      See Also:
    • F_CHILDREN

      static final int F_CHILDREN
      Change flag indicating that there are changes to the children of the element.
      See Also:
    • F_MOVED_FROM

      static final int F_MOVED_FROM
      Change flag indicating that the element was moved from another location. The location of the old element can be retrieved using getMovedFromElement.
      See Also:
    • F_MOVED_TO

      static final int F_MOVED_TO
      Change flag indicating that the element was moved to another location. The location of the new element can be retrieved using getMovedToElement.
      See Also:
    • F_REORDER

      static final int F_REORDER
      Change flag indicating that the element has changed position relatively to its siblings. If the element is an IPackageFragmentRoot, 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_OPENED
      Change flag indicating that the underlying IProject has been opened.
      See Also:
    • F_CLOSED

      static final int F_CLOSED
      Change flag indicating that the underlying IProject has been closed.
      See Also:
    • F_ADDED_PATHENTRY_SOURCE

      static final int F_ADDED_PATHENTRY_SOURCE
      A source entry added for this resource.
      See Also:
    • F_REMOVED_PATHENTRY_SOURCE

      static final int F_REMOVED_PATHENTRY_SOURCE
      A source entry was remove for this resource.
      See Also:
    • F_CHANGED_PATHENTRY_MACRO

      static final int F_CHANGED_PATHENTRY_MACRO
      A pathEntry Macro was added for this resource
      See Also:
    • F_CHANGED_PATHENTRY_INCLUDE

      static final int F_CHANGED_PATHENTRY_INCLUDE
      A pathEntry Include was added for this resource
      See Also:
    • F_ADDED_PATHENTRY_LIBRARY

      static final int F_ADDED_PATHENTRY_LIBRARY
      A pathEntry Library was added for this resource
      See Also:
    • F_REMOVED_PATHENTRY_LIBRARY

      static final int F_REMOVED_PATHENTRY_LIBRARY
      A pathEntry Library was added for this resource
      See Also:
    • F_CHANGED_PATHENTRY_PROJECT

      static final int F_CHANGED_PATHENTRY_PROJECT
      A pathEntry Project was added to the project.
      See Also:
    • F_PATHENTRY_REORDER

      static final int F_PATHENTRY_REORDER
      Reordering of the path entries.
      See Also:
    • F_SOURCEATTACHED

      static final int F_SOURCEATTACHED
      Change flag indicating that a source jar has been attached to a binary jar.
      See Also:
    • F_SOURCEDETACHED

      static final int F_SOURCEDETACHED
      Change flag indicating that a source jar has been detached to a binary jar.
      See Also:
    • F_FINE_GRAINED

      static final int F_FINE_GRAINED
      Change 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_CHANGED
      Change in the binary Parser.
      See Also:
    • F_CONTENT_TYPE

      static final int F_CONTENT_TYPE
      Change 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 of ADDED, REMOVED, or CHANGED.
    • getMovedFromElement

      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.
    • getMovedToElement

      ICElement getMovedToElement()
      Returns an element describing this element in its new location, or null if the F_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