Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ian Mitchell on June 14, 2016, 11:17:36 pm

Title: V13 menu handling with Addins
Post by: Ian Mitchell on June 14, 2016, 11:17:36 pm
Has something changed in the V13 menu handling?
In V12, when the user chooses an extension menu from the main EA menu, then EA_GetMenuItems passes menuLocation = "MainMenu"
In V13, it's passing menuLocation = "Diagram", but this seems to be a transient effect. Sometimes, I get another random menu, other times, just a top-level menu with no sub-menu items. EA may be passing the type of thing I have selected in the Project Browser, but even then not reliably, and EA12 didn't do that.
This is repeatable - when I go back to V12, all is well.
Please can someone have a look at this.
Thanks
Title: Re: V13 menu handling with Addins
Post by: Takeshi K on June 15, 2016, 09:44:30 am
Hello Ian,

I also found the same issue and have reported to Sparx. Currently the menuLocation depends on context, EA sends "Diagram" when I click any object in a diagram and then open Add-in menu on Ribbon. And sends "TreeView" when I click any object in the Project Browser and open Add-in menu on Ribbon.

Anyway, I am sure it is bug because we can not open menus for "MainMenu" location.
(I can open the "MainMenu" menu items when I click list on the Property dockable view and open Add-in menu, but this is meaningless way.)

Title: Re: V13 menu handling with Addins
Post by: Ian Mitchell on July 20, 2016, 05:28:38 pm
Update - I have tried this with the latest v13 build - 1301- and the issue is still there.
It's sad that in order to check if issues have been resolved, all we can do is download the new version, re-install it, test it again, de-install it if the issue remains.
As many, many others have said elsewhere on this forum, a simple list of 'stuff we have fixed since the last release' - with a reference to the forum item - would be the kinder way to do it.
Please ?
Title: Re: V13 menu handling with Addins
Post by: qwerty on July 20, 2016, 08:23:04 pm
http://sparxsystems.com/forums/smf/index.php/topic,31190.0.html (http://sparxsystems.com/forums/smf/index.php/topic,31190.0.html)

q.
Title: Re: V13 menu handling with Addins
Post by: Eve on July 21, 2016, 08:46:53 am
Update - I have tried this with the latest v13 build - 1301- and the issue is still there.
The latest version is 1302 and I believe it passes main menu to addins in that version.
Title: Re: V13 menu handling with Addins
Post by: Takeshi K on July 22, 2016, 09:38:44 am
Hi Simon,

I tried on the build 1302, but unfortunately it does not seem to be fixed.

Please try the following scenario on build 1302.

- select a Package in the Project  Browser and then click Visual Studio add-in menu in the Code Ribbon - show menu of the Project Browser
- select an element in a diagram and then click Visual Studio add-in menu in the Code Ribbon - show menu of diagram

Title: Re: V13 menu handling with Addins
Post by: Ian Mitchell on August 23, 2016, 12:08:06 am
I have tried this again with build 1305, and it's still broken.
I think what is happening is that,
- In V12,
 when the user clicks on a menu item, EA calls EA_GetMenuItems with a blank MenuName parameter.
Addin then responds with the 'top level' menu.
Then when the user hovers over one of those items, EA calls EA_GetMenuItems, and passes the name of the menu item they hovered over, and the addin can then respond with a sub-menu for that item

In V13, that second call doesn't seem to happen, so the user  just sees the top level menu, and empty sub-menus.
Is this what other add-in writers are seeing?
@Sparx - is this what you think the code is doing ?
Title: Re: V13 menu handling with Addins
Post by: Eve on August 23, 2016, 09:00:04 am
I've seen two bug reports regarding add-in menu handling in v13 prior to this post.

1. The MenuLocation was incorrect, never sent Main Menu. (This is the last post by T Kouno and what was corrected in 1304)
2. Get Menu state for checked state appears to be ignored.

I don't believe anyone has reported the issue about the sub-menu not being created prior to now (or through official channels)
Title: Re: V13 menu handling with Addins
Post by: Eve on August 23, 2016, 02:45:38 pm
The good news is that I've followed up on both of the outstanding issues with add-in menu handling in v13 and they should be corrected in our next build. (Which would be 1305, I'm not sure if you're using an early pre-release of that build)
Title: Re: V13 menu handling with Addins
Post by: Ian Mitchell on September 16, 2016, 06:56:14 pm
I'm trying to find out if there is a newer build where this might be fixed - is there somewhere where we can see what the latest build of V13 is, and even better, which issues are fixed in it?
Website searches on 'beta 13 release notes' don't produce anything...
Title: Re: V13 menu handling with Addins
Post by: Takeshi K on September 16, 2016, 07:03:33 pm
Hi Ian,

If I understand correctly, the menu issue has been fixed on build 1304, current public beta 1.
Now I have no issue about the menus of Add-ins on version 13.

Title: Re: V13 menu handling with Addins
Post by: Eve on September 19, 2016, 01:46:37 pm
The current build released is still 1304, which means that the issue with the checkstate has not been released yet.