|
Re: Refering to UML concepts from EMF model [message #990347 is a reply to message #990246] |
Wed, 12 December 2012 05:19 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Erlend,
Comments below.
On 11/12/2012 7:13 PM, Erlend Stav wrote:
> We have a scenario where we would like to refer to elements of a UML
> model from elements of an EMF model we are defining. Is there any
> recommended way to do this?
You mean you want an EReference whose EClass refers to one from the UML
model?
>
> To be more concrete, we have a UML model (using some UML profiles)
> that define an ontology. In EMF we are defining a model for describing
> services, where the service operations should include references to
> the ontology concepts that they have an effect on.
Profiles as I understand them are just Ecore models...
> One approach we are considering is to load the UML meta-model as a
> resource in our EMF meta-model, and then import the concepts we need
> (e.g. UML Property), and create relations from our EMF concepts to the
> UML concepts.
Yes, that sounds reasonable.
>
> Some concrete questions? 1. Is the above approach in general the right
> idea?
Yes.
> 2. How do we import the UML meta-model so that the references to it
> are valid? In the Load Resource dialog there is no direct option for
> selecting "installed" meta-models (just Browse File System... and
> Browse Workspace...).
Hmmm. Maybe I'm confused. You want your instances to refer to UML
models, not your model itself? The Sample Ecore Editor has an extended
resource dialog that allows you to load registered Ecore models, such as
UML's Ecore model.
> 3. Does this approach cause any problems e.g. with generating editors
> using Extended Editing Framework?
I think you need the latest service release of UML2 because the Juno
release had a problem with references to a "built-in types" Ecore model...
>
> Best regards,
>
> - Erlend
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Refering to UML concepts from EMF model [message #990453 is a reply to message #990430] |
Wed, 12 December 2012 15:01 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Erlend,
Comments below.
On 12/12/2012 2:24 PM, Erlend Stav wrote:
> Thanks for your quick and good answers, Ed.
>
> It would probably be a good idea that the Load resource dialogs in the
> .ecorediag also included the browsing of registered resources.
Yes, so I added it recently (along with support for diagrams for *.xcore
models).
>
> With the setup described, the references works ok also with the
> generated standard editors generated from EMF.
>
> The Extended Editing Framework does not seem to handle the references,
> though. When I try to generate using "Initialize EEF Editor", the
> resulting src-gen directory of the project is empty. It does generate
> a new .edit and .editor directory, but these only contain a single
> class each. There is no error-message provided. Could this be related
> to the error you mention in 3 ? I'm using SR1 of Juno Modeling Tools,
> and have done installed all updates available from "check for updates".
I'm not sure the fix was in SR1 but I think you would have seen the
problem with EMF GenModel already, so maybe it is... Maybe EEF depends
on the EEF stuff for UML2 being generated...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04204 seconds