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 (editModelExtension+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT editModelExtension (editModelResource+)>
<!ATTLIST editModelExtension
editModelID CDATA #REQUIRED
id CDATA #REQUIRED>
Edit model extensions allow components to contribute known resource URIs to an edit model. Whenever an edit model is loaded, the resources will automatically be loaded and managed by the edit model. Changes to the resources will be tracked and saved during operations or editor saves.
<!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.
org.eclipse.wst.common.internal.emfworkbench.integration.EditModelFactory
. If none is specified, then a generic EditModel
is created.<!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.
<extension point=
"org.eclipse.wst.common.emfworkbench.integration.editModelExtension"
>
<editModelExtension editModelID=
"org.sample.inheritance.parent.editModel"
functionGroupID=
"org.sample.group"
>
<editModelResource URI=
"DIR/extension0.xml"
/>
<editModelResource URI=
"DIR/extension1.xml"
/>
</editModelExtension>
</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