Reference to EObject? [message #380220] |
Mon, 03 November 2003 17:18  |
Eclipse User |
|
|
|
How can I model a reference to an EObject?
I want to create a metamodel which should be able to relate information
to a number of different EMF metamodels.
My metamodel is defined using Rose.
|
|
|
|
|
Re: Reference to EObject? [message #380241 is a reply to message #380230] |
Tue, 04 November 2003 14:51  |
Eclipse User |
|
|
|
Thanks. I got this working. Below are a couple more details:
In step 1
> 1) Import plugin (copy the plugin into the workspace and not use
> linking) org.eclipse.emf.ecore into your workspace, if not already
> there. If you had imported it and linked it, you will need to reimport
> it and do copy.
(File/Import/External Plugins and Fragments) a Missing Plug-ins dialog
pops up: "Some of the required plug-ins cannot be located. Can we
resolve them as project references?" [Yes,No]
I said Yes intially which lead to trouble with project refernces. Saying
No seems to be the better choice given that one is only interested in
using the base model.
> 2) extract out of
>
>
eclipse\plugins\org.eclipse.emf.source_1.1.1\src\org.eclipse .emf.ecore_1.1.1\runtime\ecoresrc.zip
>
>
> all of the model directory and put them into the
> org.eclipse.emf.ecore\src\model directory inside your workspace
>
> 3) In Rose, you will need to Load the
> org.eclipse.emf.ecore/src/model/org.eclipse.emf.Ecore.cat file into Rose
> from your workspace.
This is done using File/Untits/Load and selecting the cat file.
I think one might have to define pathmap entries in case you want to
share the model, but I havent' tried that yet.
> 4) And now you can reference EObject.
>
5. As soon as a reference is actually made one needs to declare the
"References generator model" when reloading the model. This is available
on the Package Selection page.
Otherwise a "Model Problems" dialog appears when opening the genmodel.
The detail information will look something like this:
Unable to resolve proxy 'platform<...>src/model.ecore#//EObject
Its use by 'plaftorm<...>MyModel.ecore#//MyClass/theObjects'
Rich Kulp wrote:
> The important thing is you need to import the appropriate files.
>
> First you need to:
>
> 1) Import plugin (copy the plugin into the workspace and not use
> linking) org.eclipse.emf.ecore into your workspace, if not already
> there. If you had imported it and linked it, you will need to reimport
> it and do copy.
>
> 2) extract out of
>
> eclipse\plugins\org.eclipse.emf.source_1.1.1\src\org.eclipse .emf.ecore_1.1.1\runtime\ecoresrc.zip
>
>
> all of the model directory and put them into the
> org.eclipse.emf.ecore\src\model directory inside your workspace
>
> 3) In Rose, you will need to Load the
> org.eclipse.emf.ecore/src/model/org.eclipse.emf.Ecore.cat file into Rose
> from your workspace.
>
> 4) And now you can reference EObject.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04440 seconds