|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 11:39
| Ed Willink
Registered: July 2009
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.
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)
|Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694520 is a reply to message #1694445]
||Tue, 05 May 2015 22:24
| Paul Roubekas
Registered: March 2012
Location: Chattanooga, TN USA
What I want to be able to do is start with a EMF model to design a large set of Eclipse plug-ins to make a Eclipsed Rich Client Platform piece of software. EMF has imbedded knowledge of the eclipse framework. EMF does not do full UML modeling. So I was hoping to have a development cycle like the following.|
1. Build the EMF Model
2. Build the EMF genmodel
3. Import the genmodel in Papyrus.
4. Use the EMF classes as a base for 12 different Papyrus Diagrams. (Use Case, Package, Sequence, etc...)
5. Discover new artifacts needed (methods, classes, attributes, etc...) as the result of work in Papyrus.
6. Add the new artifacts to the EMF model
7. Build the EMF genmodel
8. Import the new genmodel in Papyrus without loosing work already done.
9. Repeat step 6 - 8 as needed
I got the impression from this forum thread (https://www.eclipse.org/forums/index.php/m/1633763/#msg_1633763) and this one (https://www.eclipse.org/forums/index.php/m/1030124/?srch=java#msg_1030124) that it was possible. (Now that I read the thread again it seems I should have understood "seed" to mean only one time and not re-imported with changes.) So since there was no page on the wiki describing the steps in detail I though I would do the "Open Source" thing and create the wiki page for the benefit of others.
While the wiki page does change to the Papyrus first, it was not the original intent. I was just playing around to trying to give a reader a sense of what could and could not be done.
From Camille's response: I not sure if what I am trying to do is a "contexts (resource sets)" load.
[Updated on: Tue, 05 May 2015 23:25]
Report message to a moderator
|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 07:58
| Camille Letavernier
Registered: February 2011
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
Powered by FUDForum
. Page generated in 0.05123 seconds