Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: putrigmail on September 19, 2012, 12:45:47 am
-
Hi all,
I use EA_OnContextItemChanged to handle event when user clicks an object (package/element/diagram). However, it is not fired up when user clicks Root/Model node (while it works with other packages).
Is there any other way to handle clicking Root/Model node?
Thanks :)
-
I don't think there is a way to do that: there are no events that get fired when clicking on a root node and there is no other way to trap a user click event in EA.
The best you can achieve is to use the EA_GetMenuItems event to define a popup submenu below 'extensions' and react to a click event on that. Use Repository.GetTreeSelectedPackage().name to retrieve the name of the selected package, this works for root nodes as well.
-
Thank you for your answer ;). It is strange why there's no direct event to handle root node.
-
Send in a bug report (http://www.sparxsystems.com/support/bug_report.html). I don't see any good reason not to fire the event, so it is probably just a bug.
Geert