|
|
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 Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
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 #1694520 is a reply to message #1694445] |
Tue, 05 May 2015 22:24 |
Paul Roubekas Messages: 207 Registered: March 2012 Location: Chattanooga, TN USA |
Senior Member |
|
|
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.
Oxygen 3a
Windows 10
[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 Messages: 952 Registered: February 2011 |
Senior Member |
|
|
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
Camille Letavernier
|
|
|
|
Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694724 is a reply to message #1694657] |
Thu, 07 May 2015 11:58 |
|
Hi,
Yes, this is the profile that the Eclipse UML2 project's EMF-based code
generation (which Camille referenced in an earlier reply) uses to
extend UML class models for Ecore-specific semantics. So, fully
supported.
I would agree that the requirement of two asterisks is a bug, but I
think it is the way that the filter/selection dialog provided by
Eclipse platform is intended to work (which might simply mean that
Papyrus should not use it). At the very least, when the list of
available profiles is so small (which would be expected in most
installations), they should just be shown so that the user isn't made
to wonder whether there are any profiles available at all. Would you
mind raising a bug?
Also a bug is the "Eclipe.org" provider name for the Ecore profile.
HTH,
Christian
On 2015-05-07 00:29:08 +0000, Paul Roubekas said:
> While trying to implement your suggestion I found out the I could add
> ECore stuff to a brand new Papyrus model using UML Profiles. See the
> sequence below. Is this method is supported?
>
>
>
> The one finding that causes me to think the method may not be supported
> it that a double asterisks is needed to see the Ecore repository. So
> the double asterisks is either a bug that allows the Ecore profile to
> be seen when it should not be visible. Or the need for a double
> asterisks is bug that needs fixed.
>
>
>
> <image>
|
|
|
|
Re: wiki page: How to get a EMF Ecore model into a Papyrus class diagram [message #1694875 is a reply to message #1694751] |
Fri, 08 May 2015 15:49 |
Paul Roubekas Messages: 207 Registered: March 2012 Location: Chattanooga, TN USA |
Senior Member |
|
|
I am trying to understand the all trade offs between starting in EMF ecore compared to just starting in Papyrus with the ecore UML profile. I started this analysis because I noticed that while I can just start in Papyrus, the profiles editor in the properties window of a class diagram allows for any string when changing a value in the applied stereotype. (See attached screen capture) I can see how this could create all kinds of issues for me being a newbie.
Earlier in this thread it was said that a click and drag of a package from EMF ecore editor to the Papyrus editor worked by accident, not by design. I have done some playing around and can not find out how to as Camille put it
"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." from EMF core into Papyrus in the supported way.
How does one "import" ecore into Papyrus using the supported method?
-
Attachment: Snap1.png
(Size: 57.80KB, Downloaded 1435 times)
Oxygen 3a
Windows 10
[Updated on: Fri, 08 May 2015 15:52] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04416 seconds