Moving a class diagram between packages [message #1781205] |
Fri, 02 February 2018 18:23 |
Arun Gupta Messages: 5 Registered: January 2018 |
Junior Member |
|
|
Hello Eclipse Forum,
I am a newcomer to Papyrus, a heavy user of Sparx Enterprise Architect.
Papyrus Diagram, Properties view, General Tab, has "Owner" and "Root Element".
After gendoc didn't generate a document as I expected, I noticed that a diagram dragged, from say Package1 to Package2 changes its Owner from Package1 to Package2, but keeps its Root Element as Package1.
Moreover Package.getPapyrusDiagrams() looks for diagrams whose Root Element is the Package, and not diagrams whose Owner is the Package.
One has to explicitly change the Root Element for a diagram that is moved.
Q1. What is the difference between "Root Element" and "Owner"?
Q2. Why does Acceleo/gendoc go by Root Element and not by Owner?
Q3. Why doesn't the diagram Root Element change properly by itself?
In any case, the intent when putting a diagram in a package is that the diagram will be displayed, printed, etc., as part of the package, so why isn't that the default behavior?
There are likely good reasons behind this, but for someone coming from the aforementioned tool, this is very non-obvious.
I'm using Eclipse Oxygen 4.7.2 Build id: 20171218-0600
Papyrus for UML 3.2.0.201712060842
Thanks in advance for your answers!
-Arun
|
|
|
|
Re: Moving a class diagram between packages [message #1781692 is a reply to message #1781307] |
Mon, 12 February 2018 08:50 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Arun,
The Owner is the visual container, while the Root element is the element in which new semantic elements will be created. In most cases, they should be similar, but you may want to e.g. have a package listing all your diagrams, for convenience.
When you create a Diagram on a Package P1 and create some elements inside it (Say, P1::C1), moving the diagram to a different package P2 will not move its semantic elements to that another package: the diagram is only moved visually to a different location/container, but it still represents the contents of P1.
HTH,
Camille
Camille Letavernier
|
|
|
Re: Moving a class diagram between packages [message #1781875 is a reply to message #1781692] |
Wed, 14 February 2018 07:59 |
|
I have heard several users that have been confused with this behavior. I can understand the use case for the behavior, especially for behavior diagrams, but I think that it is very rare that someone would separate the owner from the root for other kinds of diagrams.
For Papyrus to be more user-friendly I think it would be useful to have a diagram preference setting like "Synchronize root and owner" that in mine opinion should be checked by default.
Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.03548 seconds