Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: furman76 on January 14, 2017, 03:55:54 am

Title: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: furman76 on January 14, 2017, 03:55:54 am
I have two types of diagrams and want to have overlapping of tools available for them - some tools applicable for both diagrams, some are specific for one or another.
 
1) I have created toolbox profile using helper and added two custom toolboxes with different pages, and referenced each toolbox from the corresponding diagram stereotype. However, all items from both toolboxes are displayed for each diagram.
2) If I create two different profiles, apparently I have to duplicate common pages in both.

What is the point of having multiple toolboxes in one profile, and why do I need to specify toolbox profile and toolbox name (profile::name) in my diagrams, if effectively only profile is used?
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: natvig on January 18, 2017, 06:57:07 pm
I'm not sure I understand you but I think I do, and yes it is possible to achieve what you want. A couple of points:


/Hans
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: Uffe on January 18, 2017, 10:40:56 pm
Hello,

Each diagram type can only be associated with one toolbox profile, which means you have to create two toolbox profiles if you have two diagram types.

Um, it doesn't actually mean that. Each diagram type can only be associated with one toolbox profile, yes, but not vice versa. The toolbox profile is referenced by name in the diagram type ("toolbox" attribute), and two diagram types can refer to the same one.

Note that that's the whole toolbox (all pages), and I can't see why anyone would want to define two diagram types with exactly the same toolboxes -- certainly the normal case is to define one toolbox profile per diagram type. But you can reuse them if you want.

However, the issue described in the OP refers to reusing toolbox pages (ie expandable sections in the toolbox) between diagram types, and the way to do that is as Hans describes.

So in summary, if you want different toolboxes in different diagram types, you need to create separate toolbox profiles. Each toolbox profile should contain only one ToolboxPage metaclass element. You can reuse individual pages between profiles as described.


/Uffe
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: furman76 on January 27, 2017, 04:22:50 am

  • In order to share a common page definition between two diagram types you need to have this common page definition extend the ToolboxPage meta classes in both profiles! The common page can be located in one of the toolbox page packages, it does not matter which. But it should be visible in the diagrams of both toolbox pages.

No, doesn't work. Page only displayed in one toolbox associated with profile where this page is located.
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: natvig on January 27, 2017, 06:53:44 am

  • In order to share a common page definition between two diagram types you need to have this common page definition extend the ToolboxPage meta classes in both profiles! The common page can be located in one of the toolbox page packages, it does not matter which. But it should be visible in the diagrams of both toolbox pages.

No, doesn't work. Page only displayed in one toolbox associated with profile where this page is located.

Then you must have generated the toolbox profile from a directory instead of the diagrams. Or, the toolbox page is NOT present in both toolbox profile diagrams before generating the toolbox profiles. (I use this method all the time and know for a fact that it works.)
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: Uffe on January 27, 2017, 07:42:26 pm
Then you must have generated the toolbox profile from a directory package instead of the diagrams. Or, the toolbox page is NOT present in both toolbox profile diagrams before generating the toolbox profiles. (I use this method all the time and know for a fact that it works.)

FTFY.
Title: Re: What is the difference between toolbox profile and toolbox and toolbox page?
Post by: furman76 on January 27, 2017, 08:52:24 pm
Then you must have generated the toolbox profile from a directory package instead of the diagrams. Or, the toolbox page is NOT present in both toolbox profile diagrams before generating the toolbox profiles. (I use this method all the time and know for a fact that it works.)

FTFY.
Oh, I overlooked the option to save individual diagrams as profiles, thought it is only applicable to packages. This makes sense, thank you.