Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.texteditor
Interface IElementStateListener

public interface IElementStateListener

Interface for parties interested in standardized element changes. These changes are:

- dirty state changes
- content replacements
- moves
- deletions

The notifications sent to the element state listeners inform about those standardized, abstract changes. The concrete change applied might differ from the one the listeners are notified about, but should be interpreted as the one the listeners receive.

In order to provided backward compatibility for clients of `IElementStateListener`, extension interfaces are used to provide a means of evolution. The following extension interface exists:

- `IElementStateListenerExtension` since version 2.0 introducing state validation events.

See Also:
  `IElementStateListenerExtension`

Method Summary
`void` | `elementContentAboutToBeReplaced(Object element)` Notifies that the content of the given element is about to be replaced.
`void` | `elementContentReplaced(Object element)` Notifies that the content of the given element has been replaced.
`void` | `elementDeleted(Object element)` Notifies that the given element has been deleted.
`void` | `elementDirtyStateChanged(Object element, boolean isDirty)` Notifies that the dirty state of the given element has changed.
`void` | `elementMoved(Object originalElement, Object movedElement)` Notifies that the element has moved.

Method Detail

### elementDirtyStateChanged

    public void elementDirtyStateChanged(Object element,
                                         boolean isDirty)

  Notifies that the dirty state of the given element has changed.

  Parameters:
    `element` - the element
    `isDirty` - the new dirty state

### elementContentAboutToBeReplaced

    public void elementContentAboutToBeReplaced(Object element)

  Notifies that the content of the given element is about to be replaced.

  Parameters:
    `element` - the element

### elementContentReplaced

    public void elementContentReplaced(Object element)

  Notifies that the content of the given element has been replaced.

  Parameters:
    `element` - the element

### elementDeleted

    public void elementDeleted(Object element)

  Notifies that the given element has been deleted.

  Parameters:
    `element` - the element

### elementMoved

    public void elementMoved(Object originalElement,
                             Object movedElement)

  Notifies that the element has moved. If `movedElement` is `null` it is similar to `elementDeleted(originalElement)`.

  Parameters:
    `originalElement` - the element before the move
    `movedElement` - the element after the move

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.