Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Moving a class diagram between packages(Is there a reason for a class diagram to retain its Root Element when dragged to another Package?)
Moving a class diagram between packages [message #1781205] Fri, 02 February 2018 18:23 Go to next message
Arun Gupta is currently offline Arun GuptaFriend
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 #1781307 is a reply to message #1781205] Mon, 05 February 2018 21:16 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hello Arun

EDIT : concerning gendoc I've answered to you on this topic : https://www.eclipse.org/forums/index.php/m/1781305/#msg_1781305




[Updated on: Tue, 06 February 2018 07:49]

Report message to a moderator

Re: Moving a class diagram between packages [message #1781692 is a reply to message #1781307] Mon, 12 February 2018 08:50 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
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 Go to previous message
Thomas Wiman is currently offline Thomas WimanFriend
Messages: 83
Registered: June 2012
Location: Stockholm , Sweden
Member

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
Previous Topic:Plug-in Profile URI_Mapping
Next Topic:Generate profile from a domain model
Goto Forum:
  


Current Time: Fri Apr 26 07:01:47 GMT 2024

Powered by FUDForum. Page generated in 0.03712 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top