org.eclipse.eef.core.api

## Interface EditingContextAdapter

    public interface EditingContextAdapter

Connects EEF views with the external context (e.g. an editor) on behalf of which the views display and edit model elements. Clients which use the EEF runtime must supply an implementation of this interface so that the EEF views can be correctly integrated into the source context.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `addLockStatusChangedListener(IConsumer<java.util.Collection<LockStatusChangeEvent>> listener)` Adds a new lock status changed listener to the collection of lock status changed listeners to be notified when model elements are locked or unlocked.
`org.eclipse.emf.edit.domain.EditingDomain` `getEditingDomain()` Returns the editing domain.
`LockStatusChangeEvent.LockStatus` `getLockStatus(org.eclipse.emf.ecore.EObject obj)` Returns the current locking status of an element.
`org.eclipse.core.runtime.IStatus` `performModelChange(java.lang.Runnable operation)` Executes an operation which which potentially makes changes to the model.
`void` `registerModelChangeListener(IConsumer<java.util.List<org.eclipse.emf.common.notify.Notification>> listener)` Registers the sole unique model change listener listener to be notified when the model is modified.
`void` `removeLockStatusChangedListener(IConsumer<java.util.Collection<LockStatusChangeEvent>> listener)` Removes the given lock status changed listener from the list of all lock status changed listeners..
`void` `unregisterModelChangeListener()` Unregisters the currently set model change listener.

### Method Detail

#### performModelChange

    org.eclipse.core.runtime.IStatus performModelChange(java.lang.Runnable operation)

Executes an operation which which potentially makes changes to the model.

Parameters:
  `operation` - the operation.
Returns:
  the status of the operation execution.

#### registerModelChangeListener

    void registerModelChangeListener(IConsumer<java.util.List<org.eclipse.emf.common.notify.Notification>> listener)

Registers the sole unique model change listener listener to be notified when the model is modified. The listener will be called in a context in which it may not be possible to perform additional changes to the model itself. The list of changes supplied to the listener should be considered only as a hint and may be `null`.

Parameters:
  `listener` - the listener to invoke when the model is modified.

#### unregisterModelChangeListener

    void unregisterModelChangeListener()

Unregisters the currently set model change listener. Does nothing if none is currently registered.

#### getEditingDomain

    org.eclipse.emf.edit.domain.EditingDomain getEditingDomain()

Returns the editing domain.

Returns:
  The editing domain
Since:
  1.7.0

#### addLockStatusChangedListener

    void addLockStatusChangedListener(IConsumer<java.util.Collection<LockStatusChangeEvent>> listener)

Adds a new lock status changed listener to the collection of lock status changed listeners to be notified when model elements are locked or unlocked.

Parameters:
  `listener` - the listener to invoke when elements are locked or unlocked.

#### removeLockStatusChangedListener

    void removeLockStatusChangedListener(IConsumer<java.util.Collection<LockStatusChangeEvent>> listener)

Removes the given lock status changed listener from the list of all lock status changed listeners..

Parameters:
  `listener` - The listener to unregister

#### getLockStatus

    LockStatusChangeEvent.LockStatus getLockStatus(org.eclipse.emf.ecore.EObject obj)

Returns the current locking status of an element.

Parameters:
  `obj` - the element.
Returns:
  the current lock status of the element.