| [news.eclipse.platform.rcp] Re: Radio Context Menu in View |
Thanks for the quick reply Paul. According to your answers:
Paul Webster wrote:
The menu contributions are applied after any programmatic actions (Properties is added by the Package Explorer) but before any action contributions (like popupMenus). If the Properties action had an ID you could place yourself after it, but I wasn't able to find an ID for that action. There are enhancements to the locationURI to include some other options (append maybe, or after/before) but they won't be available until 3.4.
I copied your example and the menu items are shown as radio buttons ... just none of them are selected.
When you select a menu item, you have to do something ... even if it is just update your model with the currently selected target.
Use the commandId that will execute that action. One "way" of providing the effect you want is to have the command take an optional parameter. Selecting the menu item executes the command with the "target" parameter. In your handler, you would then update whatever model you have to the correct "target" and then you can "refresh" your command UI elements (your handler implements IElementUpdater). You can then update each UI element as to whether or not it is checked.
Thanks in advance,
Guillaume Boivin