Hello,
In my app, I have declared this command
<handler
class="my.commands.edition.CreateNewFolderHandler"
commandId="my.commands.edition.createNewFolder">
<activeWhen>
<with
variable="activePartId">
<or>
<equals
value="my.views.methods.MyTreeView">
</equals>
</or>
</with>
</activeWhen>
<enabledWhen>
<reference
definitionId="my.commands.edition.mayCreateFolderDef">
</reference>
</enabledWhen>
</handler>
<definition
id="my.commands.edition.mayCreateFolderDef">
<with
variable="activeMenuSelection">
<iterate
ifEmpty="true"
operator="or">
<test
forcePluginActivation="true"
property="my.testers.edition.mayCreateFolder"
value="true">
</test>
</iterate>
</with>
</definition>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="my.commands.edition.createNewFolder"
contextId="org.eclipse.ui.contexts.window"
schemeId="my.scheme"
sequence="M1+ARROW_LEFT">
</key>
</extension>
I need this menu to show only as a pop-up so I made it check if it's enabled on "activeMenuSelection".
The problem is that in this case the keybinding doesn't work.
The keybinding does work when I replace "activeMenuSelection" with "selection" but I don't want this check to happen each time the user clicks on something in that tree because the methods that do the check go on a server and I have multiple commands in this tree. That would make my app a LOT less responsive.
Is there a way I can get the keybindings to work in these conditions? Do I have other options?
Thank you!
Alexandra.