Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to Use Eclipse EMF Resource Edit Model Extension
How to Use Eclipse EMF Resource Edit Model Extension [message #180656] Thu, 05 October 2006 15:21
Eclipse UserFriend
Originally posted by:

I am trying to understand the usage of
org.eclipse.wst.common.emfworkbench.integration.editModel extension? Any
information or where to find more info on how to use this for EMF Editor? Or
am I going in a wrong direction.

The help topic for this is: wst.doc.isv/reference/extension-points/web/org_eclipse_wst_c ommon_emfworkbench_integration_editModelExtension.html
(below) is vague on how to use it for beginner

EMF Resource Edit Model



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 - a fully qualified identifier of the target extension point
id - an optional identifier of the extension instance
name - an optional name of the extension instance

<!ELEMENT editModel (editModelResource+)>

<!ATTLIST editModel


factoryClass CDATA #REQUIRED

loadUnknownResourcesAsReadOnly (true | false)


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

editModelID - A unique identifier for the edit model.
factoryClass - An optional factory class that is used for this edit model.
The class must implement the interface
org.eclipse.wst.common.internal.emfworkbench.integration.Edi tModelFactory.
If none is specified, then a generic EditModel is created.
loadUnknownResourcesAsReadOnly -
parentModelID -

<!ELEMENT editModelResource EMPTY>

<!ATTLIST editModelResource


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.

URI - The URI of the resource relative to the root container from which EMF
resources are loaded.
autoload - Indicator which determines whether this resource should be
autoloaded when the edit model is created, or when an IFile corresponding to
this resource is added.

name="Acme Parent Edit Model"
point="org.eclipse.wst.common.emfworkbench.integration.editModel ">
factoryClass=" org.eclipse.wst.common.internal.emfworkbench.integration.Edi tModelFactory ">
<editModelResource URI="DIR/resource0.xml"/>
<editModelResource URI="DIR/resource1.xml"/>

name="Acme Child Edit Model"
point="org.eclipse.wst.common.emfworkbench.integration.editModel ">
factoryClass=" org.eclipse.wst.common.internal.emfworkbench.integration.Edi tModelFactory "
<editModelResource URI="DIR/resource2.xml"/>
<editModelResource URI="DIR/resource3.xml"/>

API Information:
Edit Models can be accessed through the
org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchCon text.
Previous Topic:EMF EditModel Extension
Next Topic:xml editor usable for rcp
Goto Forum:

Current Time: Mon Jun 18 06:09:34 GMT 2018

Powered by FUDForum. Page generated in 0.01436 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top