Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Viking on January 29, 2025, 05:38:45 am

Title: Extend a Menu
Post by: Viking on January 29, 2025, 05:38:45 am
Hi, I created a menu and everything works fine. The menu appears, when I hit my created Add-In button under “Specialize”. Maybe this is all I can get.

But if I remember correctly, it is / was also possible to add a menu-item to the right-click-menu / context menu as “Extensions”. The manual is a little bit "misleading" here because it does not show pictures / the result. But I found an example from Gert Bellekens at https://bellekens.com/2015/01/11/using-add-in-menu-with-ea-matic/. That shows “Extensions”.

So, my question is: is it possible to change a standard-menu and if yes, how?

As I said, my menu works. I followed the manual and checked with the example from Gert.
Title: Re: Extend a Menu
Post by: Eve on January 29, 2025, 09:17:44 am
Maybe this is all I can get
Yes.

But I found an example from Gert Bellekens at https://bellekens.com/2015/01/11/using-add-in-menu-with-ea-matic/. That shows “Extensions”.
Just a difference in the menu name on our side.

So, my question is: is it possible to change a standard-menu and if yes, how?
No.
Title: Re: Extend a Menu
Post by: Viking on January 29, 2025, 06:09:50 pm
Many thanks, @Eve.
Title: Re: Extend a Menu
Post by: Viking on January 30, 2025, 06:14:31 pm
My question was not precise enough. I did not know that the menu item “Specialize” appears in each context menu. In each of the context menus appear the custom add-in with its name (and not "extensions") as part of "Specialize". The menu of the custom add-in is on demand, it is created by each click. So, the menu could reflect for what it is needed currently for the respective
-   Diagram.
-   Element.
-   Each entry in the Project Browser.
-   Menu bar.
-   Relationship.
-   Something else?
Title: Re: Extend a Menu
Post by: Geert Bellekens on January 30, 2025, 06:41:36 pm
Yes, you can completely customize the menu entries (within Specialize|<YourAddin>) depending on the selected item and location (diagram, treeview, menu)

Geert