EMF Resource Edit Model

Identifier:
org.eclipse.wst.common.emfworkbench.integration.editModel

Since:
1.0

Description:
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.

Configuration Markup:

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



<!ELEMENT resourceExtension EMPTY>

<!ATTLIST resourceExtension

name CDATA #IMPLIED>

This allows registration of files for autoloading according to file extension.



Examples:

   <extension
         id="editModel.acme.parent"
         name="Acme Parent Edit Model"
         point="org.eclipse.wst.common.emfworkbench.integration.editModel">
      <editModel
            editModelID="com.acme.acmepro.parent.editModel"
            factoryClass="org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory">
        <editModelResource URI="DIR/resource0.xml"/>
        <editModelResource URI="DIR/resource1.xml"/>
      </editModel>
   </extension>

   <extension
         id="editModel.acme.child"
         name="Acme Child Edit Model"
         point="org.eclipse.wst.common.emfworkbench.integration.editModel">
      <editModel
            editModelID="com.acme.acmepro.child.editModel"
            factoryClass="org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory"
            parentModelID="com.acme.acmepro.parent.editModel">
        <editModelResource URI="DIR/resource2.xml"/>
        <editModelResource URI="DIR/resource3.xml"/>
      </editModel>
   </extension>


Copyright (c) 2005 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