Java Reference
In-Depth Information
EMF Setup
When using EMF models, configuring a bean element with the
Standalone
Setup
class is required in the workflow. A number of elements are available to
be used within the
StandaloneSetup
component, as described next.
platformUri
This element points to the platform, and, in most cases, the value used is simply
../
, as shown in the following example. In a project in which the .ecore file is
within a source path of the project and uses a local dynamic instance model as
input, this is all that setup requires.
<
bean
class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<
platformUri
value="../" />
</bean>
uriMap
The
uriMap
element enables you to specify a map from the package's registered
NS URI to another URI, such as a
platform:/resource/.
.. URI. For exam-
ple, working with a mindmap instance model, not a local dynamic instance
model that references an *.
ecore
model, you can map its NS URI to a work-
space *.
ecore
model for resolution, as follows:
<
bean
class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<
platformUri
value="../" />
<
uriMap
from="http://www.eclipse.org/2008/mindmap"
to="platform:/resource/org.eclipse.dsl.mindmap/model/mindmap.ecore"/>
</
bean
>
RegisterGeneratedEPackage
Models in the environment that have contributed to the EMF
generated_
package
extension-point can be referenced using the
RegisterGenerated
EPackage
element. The package element's class attribute of the contribution is
used as the value, as shown here:
<
bean
class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<
platformUri
value="../" />
<
RegisterGeneratedEPackage
value="org.eclipse.jem.java.JavaRefPackage"/>
</bean>
Search WWH ::
Custom Search