Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » CommandContributionItem parameterization not working in Main Menu(bug or feature?)
CommandContributionItem parameterization not working in Main Menu [message #1402650] Thu, 17 July 2014 09:38 Go to next message
João Rebelo is currently offline João RebeloFriend
Messages: 28
Registered: December 2013
Junior Member
Hi,

I'm working in E4 compatibility mode, in a application that is using CommandContributionItem for dinamically add items to the Main Menu.
This is being added at the ApplicationActionBarAdvisor.fillMenuBar (in case it affects the bootup flow)
The code would be something as:

CommandContributionItemParameter aEnParam = new CommandContributionItemParameter(theWindow, "Language.en.Label", "com.compxc.workbench.presentation.command.changeLanguageCommand", IAction.AS_RADIO_BUTTON);
aEnParam.label = ResourceManager.getText("Language.en.Label");
HashMap<String, String> aEnParamMap = new HashMap<String, String>();
aEnParamMap.put("org.eclipse.ui.commands.radioStateParameter", "EN");
aEnParam.parameters = aEnParamMap;
englishAction = new CommandContributionItem(aEnParam);
theMenuBar.add(englishAction);


Although I can see it being correctly parameterized with my value, when I get to the execution in the Handler, the Event doesn't bring any parameter.

A similar example in a context menu, with the same code creating the Contribution works just fine, and the Handler receives the parameter.

Any idea how to fix this, or how to generate a Command based Contribution with correct parameterization?
Re: CommandContributionItem parameterization not working in Main Menu [message #1402690 is a reply to message #1402650] Thu, 17 July 2014 10:54 Go to previous message
João Rebelo is currently offline João RebeloFriend
Messages: 28
Registered: December 2013
Junior Member
After doing a quick test on E3 and E4 this really seems like a bug, since it works fine with E3 target but not with E4 (luna).
Follows a simple test based in mail application
Previous Topic:To migrate or not to migrate (Indigo to Luna)
Next Topic:Luna Editor bugs
Goto Forum:
  


Current Time: Tue Mar 19 06:23:09 GMT 2024

Powered by FUDForum. Page generated in 0.01857 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top