Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Martin Terreni on December 02, 2004, 12:35:44 am

Title: hiding pakcage content
Post by: Martin Terreni on December 02, 2004, 12:35:44 am
How can I hide package content when dragged into diagram?

thanks
Title: Re: hiding pakcage content
Post by: thomaskilian on December 02, 2004, 02:46:27 am
This can only be done for whole diagrams: diagram properties/Show Package Contents.
Title: Re: hiding pakcage content
Post by: Martin Terreni on December 02, 2004, 04:42:41 am
 :(
Title: Re: hiding pakcage content
Post by: mchiuminatto on December 02, 2004, 04:44:18 am
Thomas

I don't know if I understood the question of MartinT, but there’s a way to choose the elements of a package you want to show to the outside.

Follow these steps.

1. Create a package.
2. Open the diagram package and add some class, four for instance.
3. Click class1, and set the property scope to private.
4. The same with class3
5. Go to the parent diagram, where the package is shown.
6. Select diagram properties and at the right side of the dialog you will see an option group Visible Class Members.
7. Uncheck: Protected, Private and Package.
9. Click OK
10. You should see just class2 and class4 as the package contents.

As you see you can choose what to show as the package contents handling the scope of the elements within the package and the visibility of the class members of the diagram showing the package.

Hope it helps.
helps
Title: Re: hiding pakcage content
Post by: Martin Terreni on December 02, 2004, 05:40:24 am
Thanks!
Title: Re: hiding pakcage content
Post by: thomaskilian on December 02, 2004, 08:20:56 am
Right. But from my point of view you missuse a property to achieve that.
Title: Re: hiding pakcage content
Post by: mchiuminatto on December 02, 2004, 10:45:55 am
Thomas

Your are right, It's depends on the point of view, so maybe you will have to create more than one diagram to view the packages from the outside (hiding private, package and protected members) and from the inside (showing all), but always based on the inherent  scope of the members.

Title: Re: hiding pakcage content
Post by: CJ on December 02, 2004, 11:39:58 am
G'day,

You might want to consider creating some extra packages/diagrams and using the option "Show Linked Items in Package" (checkout "Diagram Behavior" in EA's help index).

As an example, setup a "Main" package that includes two elements.  Then, setup a "View into Main" package that has a diagram onto which you've dragged and dropped one of those elements above as a simple link.

Finally, create a diagram in some other package and drag/drop onto that diagram the packages "Main" and "View into Main".  That might give you the effect you're looking for.
Title: Re: hiding pakcage content
Post by: Martin Terreni on December 04, 2004, 10:19:44 pm
a little complicated, but a god idea...