org.eclipse.cdt.core.model

## 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.

### Field Summary

Fields
`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. an analysis down to the members level was done to determine if there were structural changes to members.
`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.

### Method Summary

All Methods Instance Methods Abstract Methods
`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.
`IResourceDelta[]` `getResourceDeltas()` Returns the collection of resource deltas.

### Field Detail

#### ADDED

    static final int ADDED

Status constant indicating that the element has been added.

See Also:
  Constant Field Values

#### REMOVED

    static final int REMOVED

Status constant indicating that the element has been removed.

See Also:
  Constant Field Values

#### CHANGED

    static final int CHANGED

Status constant indicating that the element has been changed, as described by the change flags.

See Also:
  Constant Field Values

#### F_CONTENT

    static final int F_CONTENT

Change flag indicating that the content of the element has changed.

See Also:
  Constant Field Values

#### F_MODIFIERS

    static final int F_MODIFIERS

Change flag indicating that the modifiers of the element have changed.

See Also:
  Constant Field Values

#### F_CHILDREN

    static final int F_CHILDREN

Change flag indicating that there are changes to the children of the element.

See Also:
  Constant Field Values

#### 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:
  Constant Field Values

#### 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:
  Constant Field Values

#### 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:
  Constant Field Values

#### F_OPENED

    static final int F_OPENED

Change flag indicating that the underlying `IProject` has been opened.

See Also:
  Constant Field Values

#### F_CLOSED

    static final int F_CLOSED

Change flag indicating that the underlying `IProject` has been closed.

See Also:
  Constant Field Values

#### F_ADDED_PATHENTRY_SOURCE

    static final int F_ADDED_PATHENTRY_SOURCE

A source entry added for this resource.

See Also:
  Constant Field Values

#### F_REMOVED_PATHENTRY_SOURCE

    static final int F_REMOVED_PATHENTRY_SOURCE

A source entry was remove for this resource.

See Also:
  Constant Field Values

#### F_CHANGED_PATHENTRY_MACRO

    static final int F_CHANGED_PATHENTRY_MACRO

A pathEntry Macro was added for this resource

See Also:
  Constant Field Values

#### F_CHANGED_PATHENTRY_INCLUDE

    static final int F_CHANGED_PATHENTRY_INCLUDE

A pathEntry Include was added for this resource

See Also:
  Constant Field Values

#### F_ADDED_PATHENTRY_LIBRARY

    static final int F_ADDED_PATHENTRY_LIBRARY

A pathEntry Library was added for this resource

See Also:
  Constant Field Values

#### F_REMOVED_PATHENTRY_LIBRARY

    static final int F_REMOVED_PATHENTRY_LIBRARY

A pathEntry Library was added for this resource

See Also:
  Constant Field Values

#### F_CHANGED_PATHENTRY_PROJECT

    static final int F_CHANGED_PATHENTRY_PROJECT

A pathEntry Project was added to the project.

See Also:
  Constant Field Values

#### F_PATHENTRY_REORDER

    static final int F_PATHENTRY_REORDER

Reordering of the path entries.

See Also:
  Constant Field Values

#### F_SOURCEATTACHED

    static final int F_SOURCEATTACHED

Change flag indicating that a source jar has been attached to a binary jar.

See Also:
  Constant Field Values

#### F_SOURCEDETACHED

    static final int F_SOURCEDETACHED

Change flag indicating that a source jar has been detached to a binary jar.

See Also:
  Constant Field Values

#### 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:
  Constant Field Values

#### F_BINARY_PARSER_CHANGED

    static final int F_BINARY_PARSER_CHANGED

Change in the binary Parser.

See Also:
  Constant Field Values

#### F_CONTENT_TYPE

    static final int F_CONTENT_TYPE

Change in the binary Parser.

See Also:
  Constant Field Values

### Method Detail

#### 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:
  `F_CHILDREN`, `F_CONTENT`, `F_MODIFIERS`, `F_MOVED_FROM`, `F_MOVED_TO`

#### 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

    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