java - Grayed out option in popupmenu -


i'm building eclipse plugin. when right click on items in table popup menu selections pops up. want selection grayed out if more 1 items selected. have tried using enablesfor="1" in action tag in plugin.xml file.

<extension point="org.eclipse.ui.popupmenus">      <objectcontribution                      id="se.myproject.xxxxxx.ui.replaceitemasreference"             objectclass="se.xxxxx.xxxx.core.xxxxx.entityitem">          <action                class="se.myproject.xxxxxx.ui.views.referenceaction"                enablesfor="1"                id="se.myproject.xxxxxx.ui.views.replaceitemasreference"                label="do stuff"                menubarpath="additions-ext">          </action>             </objectcontribution>       </extension> 

but it's not graying out selection. wonder if have additional coding achieve this?

i want result this!

looks may eclipse bug. 'restore local history' popup menu item declared in similar way , stays enabled multiple selection.

other menu items declared using '1' enablesfor work, difference seems use <menu> element put menu item in sub-menu.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -