EMF Resource Edit Model

com.ibm.etools.emf.workbench.editModel

6.0

Edit models provide a framework for managing a set of EMF resources within a unit of work. For example, a workspace operation may affect a change to multiple EMF resources. Edit models provide basic services such as loads, saves (when necessary), and validate edit for the managed resources. Edit models are reference counted, therefore a single instance of an edit model can be shared by more than one operation or editor. By declaring an edit model, a plugin provider enables other components to contribute resources to be managed by that edit model.

<!ELEMENT extension (editModel+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT editModel (editModelResource+)>

<!ATTLIST editModel

editModelID                    CDATA #REQUIRED

factoryClass                   CDATA #REQUIRED

loadUnknownResourcesAsReadOnly (true | false)

parentModelID                  CDATA #IMPLIED>

The declaration for an edit model to be used in the workspace.



<!ELEMENT editModelResource EMPTY>

<!ATTLIST editModelResource

URI      CDATA #REQUIRED

autoload (true | false) "false">

This is an individual contribution of a resource to the edit model. If more than one instance of the same URI is registered against an edit model id, the resource is still only loaded once.




   <extension
         id="editModel.acme.parent"
         name="Acme Parent Edit Model"
         point="com.ibm.etools.emf.workbench.editModel">
      <editModel
            editModelID="com.acme.acmepro.parent.editModel"
            factoryClass="com.ibm.etools.emf.workbench.edit.EditModelFactory">
        <editModelResource URI="DIR/resource0.xml" /> 
        <editModelResource URI="DIR/resource1.xml" />
      </editModel>
   </extension> 
   
   <extension
         id="editModel.acme.child"
         name="Acme Child Edit Model"
         point="com.ibm.etools.emf.workbench.editModel">
      <editModel
            editModelID="com.acme.acmepro.child.editModel"
            factoryClass="com.ibm.etools.emf.workbench.edit.EditModelFactory"
            parentModelID="com.acme.acmepro.parent.editModel">
        <editModelResource URI="DIR/resource2.xml" /> 
        <editModelResource URI="DIR/resource3.xml" />
      </editModel>
   </extension>   

Edit Models can be accessed through the com.ibm.etools.emf.workbench.EMFWorkbenchContext.

[Enter information about supplied implementation of this extension point.]