# EMF Transaction Resource Set Listeners

###### Identifier:

org.eclipse.emf.transaction.listeners

###### Since:

1.0

###### Description:

This extension point declares listeners that are automatically attached to the editing domains that they target, when those editing domains are initialized by the editor domain registry.

###### Configuration Markup:

<!ELEMENT extension (listener+)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

Registers `ResourceSetListener` with named editing domains.

<!ELEMENT listener (editingDomain*)>

<!ATTLIST listener

class CDATA #IMPLIED>

Registers a `ResourceSetListener` that is attached to the identified editing domain instance when it is added to or created by the editing domain registry. When (and if) the editing domain is unregistered, the listener is removed from it. If no editing domains are referenced by a listener extension, then the listener is attached to all registered. `TransactionalEditingDomain` instances. Unregistered editing domains are not affected.

- class - Identifies a class implementing the `ResourceSetListener` interface. This class is instantiated (using the default constructor).

<!ELEMENT editingDomain EMPTY>

<!ATTLIST editingDomain

id CDATA #REQUIRED>

Identifies one or more editing domains to attach the listener to.

- id - Unique identifier of the editing domain, registered via the `editingDomains` extension point.

###### Examples:

This example shows an extension that declares a listener for an example editing domain, which applies triggers (a pre-commit listener) to ensure model integrity.

       <extension
             point="org.eclipse.emf.transaction.listeners">

          <listener
                namespaceUri="http:///org/eclipse/emf/examples/library/extlibrary.ecore/1.0.0"
                class="com.example.transaction.listeners.EXTLibraryTriggerListener"/>
             <editingDomain id="com.example.my.editing.domain"/>
          </listener>
       </extension>

Copyright (c) 2005, 2006 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html