Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Zidane on September 27, 2006, 03:28:38 am

Title: Packages in Class Diagram
Post by: Zidane on September 27, 2006, 03:28:38 am
Hi All!

When a package (Ap) contains a class diagram (Acd) and I move the package (Ap) to another class diagram (Bcd) the package shows the contents of the diagram
(X,Y,Z).

If I move the Class diagram (Acd) out of the package (Ap), the package on the diagram (Bcd) shows the content of the package (X,Y).

Package Ap
 Class Diagram Acd (X, Y --> Z)
 Class X
 Class Y
Package Bp
 Class Diagram Bcd
 Class Z

I don't understand that logic. If anyone does(and hopefully understands my explaination too  ;D ) maybe you could explain it to me.

Thanks in advance.

Best regards,
DD
Title: Re: Packages in Class Diagram
Post by: Jan ´Bary´ Glas on September 27, 2006, 04:07:09 am
Using a diagram with a foreign element in a package says that the element is used there, so it is interpreted as a (foreign) member - not specifying if imported or so.
(http://img100.imageshack.us/img100/3190/imgia1.jpg)
Title: Re: Packages in Class Diagram
Post by: Zidane on September 27, 2006, 06:47:07 am
Hi Jan!

Hope you get rewarded by Sparx for all your work you do in that forum  :D

Nevertheless, I don't think that this behavour is correct...

For example: If you move Z into Bcd, you will see Z inside and outside the package Ap.

For me the package Ap contains the elements X, Y and that is what should be displayed.

DD
Title: Re: Packages in Class Diagram
Post by: Jan ´Bary´ Glas on September 27, 2006, 06:53:27 am
My feelings are just different. What the others?
Title: Re: Packages in Class Diagram
Post by: Paolo F Cantoni on September 27, 2006, 07:44:09 am
Quote
Using a diagram with a foreign element in a package says that the element is used there, so it is interpreted as a (foreign) member - not specifying if imported or so.
(http://img100.imageshack.us/img100/3190/imgia1.jpg)
Jan,

The browser picture doesn't seem to agree with the diagrams.

When I tried to set up Zidane's example, I didn't get Z in package Ap, only X&Y which seems correct to me.

So, I don't get Zidane's behaviour and I don't get your picture.  But for me "it's all good".

HTH,
Paolo

Paolo
Title: Re: Packages in Class Diagram
Post by: Zidane on September 27, 2006, 08:46:50 am
Hi Paolo!

You get that behaviour only if the diagram (Acd) is IN the package (Ap). Maybe that is why you can't reproduce it on your side.

Best regards,
DD
Title: Re: Packages in Class Diagram
Post by: Paolo F Cantoni on September 27, 2006, 03:28:33 pm
Quote
Hi Paolo!

You get that behaviour only if the diagram (Acd) is IN the package (Ap). Maybe that is why you can't reproduce it on your side.

Best regards,
DD
I had Acd IN (nested under) Ap and I had Bcd IN (nested under) Bp.

Still works fne for me.  Could any settings affect this?

Paolo
Title: Re: Packages in Class Diagram
Post by: Eve on September 27, 2006, 03:33:47 pm
Have a look at the Diagram Behavior options page. (Tools | Options | Diagram | Behavior)

There is an option there called 'Show Linked Items in Package'.  Checking this has the effect that any element shown in a diagram contained by that package is included in the package contents for that package.
Title: Re: Packages in Class Diagram
Post by: Paolo F Cantoni on September 27, 2006, 03:51:38 pm
Quote
Have a look at the Diagram Behavior options page. (Tools | Options | Diagram | Behavior)

There is an option there called 'Show Linked Items in Package'.  Checking this has the effect that any element shown in a diagram contained by that package is included in the package contents for that package.
Confirmed...

But shouldn't this be available on a per diagram basis?

Paolo
Title: Re: Packages in Class Diagram
Post by: Zidane on September 27, 2006, 11:55:54 pm
Quote
Have a look at the Diagram Behavior options page. (Tools | Options | Diagram | Behavior)

There is an option there called 'Show Linked Items in Package'.  Checking this has the effect that any element shown in a diagram contained by that package is included in the package contents for that package.


Great help!

Thank you  ;D