|
|
Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694445 is a reply to message #1694408] |
Tue, 05 May 2015 07:39   |
Eclipse User |
|
|
|
Hi
Today, dropping Ecore objects into a UML tool is rather like talking
French to somone who understands only Russian.
However it might not really be that stupid.
The Pivot model for OCL normalises external metamodels so that the
differences between Ecore and UML and .... vanish for shared concepts.
One day Papyrus might exploit this so that an Ecore-to-Pivot-to-UML
conversion happens automatically.
Regards
Ed Willink
On 05/05/2015 08:50, Camille Letavernier wrote:
> Hi Paul,
>
> I'm not sure to understand what you are trying to do. First, dropping
> objects from an external editor to Papyrus seems to be only
> accidentally supported. Objects are loaded in different contexts
> (resource sets), and I don't think that Papyrus reloads them into its
> own resource set, so you may end up with cross-resourceSet references
> (Meaning that some objects may not be saved since we only save
> Papyrus' resource set).
>
> Dropping non-UML objects (Ecore objects) will probably not work at all
> (Or, once again, accidentally, through a generic mechanism, but I
> can't think of any such mechanism in Papyrus)
>
> Camille
|
|
|
|
Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694545 is a reply to message #1694520] |
Wed, 06 May 2015 03:58   |
Eclipse User |
|
|
|
Hi Paul,
The simplest way to use both UML and Ecore at the same time is to produce a UML Class Diagram (Or import it from an existing Ecore model), then forget Ecore entirely.
UML extends the EMF Genmodel to be able to generate both the Ecore and the Java Code from a UML ClassDiagram directly (With the added features of UML regarding Associations and Subsets). So when you create a Genmodel, select "uml" instead of "ecore" and you're good to go: no need for round-trip, since the UML Genmodel is a superset of Ecore Genmodel
If you need some kind of roundtrip, then the incremental generation of UML from Ecore would need to be implemented (Or you'd need to implement a specific Drag & Drop strategy in Papyrus to import specific Ecore concepts one by one in Papyrus, by translating them to UML during the drop, but that would be tedious for the user)
Cross resource-set issues are just a separate, low level technical detail which is not especially relevant here. I just wanted to highlight that Drag & Drop from external editors to Papyrus may seem to work but will most likely introduce unexpected side effects at some point
HTH,
Camille
|
|
|
|
|
|
|
|
Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694981 is a reply to message #1694902] |
Mon, 11 May 2015 04:03  |
Eclipse User |
|
|
|
Hi,
Quote:How does one "import" ecore into Papyrus using the supported method?
You need to do it in two steps:
1) Ecore to UML, using the Sample Ecore Model Editor
2) Right click on the *.uml file, File > New > Papyrus model
Step 2) will create a Papyrus model from the selected UML Model (Which is better than importing it in a separate model)
Regards,
Camille
|
|
|
Powered by
FUDForum. Page generated in 0.05704 seconds