Book a Demo

Author Topic: Packages in Class Diagram  (Read 5681 times)

Zidane

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Packages in Class Diagram
« 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

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Packages in Class Diagram
« Reply #1 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.
Jan 'Bary' Glas

Zidane

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Packages in Class Diagram
« Reply #2 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

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Packages in Class Diagram
« Reply #3 on: September 27, 2006, 06:53:27 am »
My feelings are just different. What the others?
Jan 'Bary' Glas

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Packages in Class Diagram
« Reply #4 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.
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
« Last Edit: September 27, 2006, 07:45:21 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Zidane

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Packages in Class Diagram
« Reply #5 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

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Packages in Class Diagram
« Reply #6 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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Packages in Class Diagram
« Reply #7 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.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Packages in Class Diagram
« Reply #8 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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Zidane

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Packages in Class Diagram
« Reply #9 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