Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ejafman on November 23, 2021, 12:30:22 am

Title: Context Item Events - Right-Click?
Post by: ejafman on November 23, 2021, 12:30:22 am
Hi all,

Just starting to read up on add-ins concepts; receptors, events, etc. etc.

There seems to be a "EA_OnContextItemDoubleClicked"...awesome. But can't seem to find an equivalent that would be called (hopefully):
"EA_OnContextItemRightClicked"

No such beast?

TIA...Eric
Title: Re: Context Item Events - Right-Click?
Post by: Geert Bellekens on November 23, 2021, 12:39:39 am
No, but you can use EA_GetMenuItems to add your menu items to the context menu.
They will appear under Specialize | YourAddinName | ...

There's also EA_GetMenuState to enable/disable your menu options, and of course EA_MenuClick to react to a menu option clicked by the user.

Geert
Title: Re: Context Item Events - Right-Click?
Post by: ejafman on November 23, 2021, 12:48:31 am
ty...so the only way is through Right click->Specialize->"Custom whatever I want"

Not Right Click->"Custom whatever I want"

Saw that, was just wondering why "specialize" necessary. Shouldn't be a problem, though, as long as I document it ;)

E
Title: Re: Context Item Events - Right-Click?
Post by: Geert Bellekens on November 23, 2021, 01:01:05 am
ty...so the only way is through Right click->Specialize->"Custom whatever I want"

Yes. I guess Sparx wants to make a clear distinction between standard features and add-in functionality.

Geert
Title: Re: Context Item Events - Right-Click?
Post by: ejafman on November 23, 2021, 02:35:52 am
ty