Community
Participate
Working Groups
Define a command <command id="mycommand" name="My Command"> <commandParameter id="myparameter" name="name" optional="true"> </commandParameter> </command> and reference it in a menu contribution <command commandId="mycommand" style="push"> <parameter name="myparameter" value="somevalue"> </parameter> </command> Menu item label will be "My Command ()". That can be fixed either by adding attribute 'values' to the command parameter definition (but suppose I do not want the parameter to be included in the menu item label), or by setting the label of the menu item explicitely label="My Command". Though the workaround is simple, it do takes time to follow the weird "()" addition to its source, and since attribute 'values' is optional, org.eclipse.core.commands.ParameterizedCommand.getName(String baseName) might first check that there is something to put inside "()", and if there is nothing, then not to add them at all.
Would you be willing to submit a patch? https://wiki.eclipse.org/Platform_UI/How_to_Contribute
@Slava: do you think you'll be able to submit a patch for that very soon? 4.6.2 deadline is approaching and I believe it would be a pity to have it missing a fix for this issue.
New Gerrit change created: https://git.eclipse.org/r/120702
Gerrit change https://git.eclipse.org/r/120702 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b3bdf8e4b31d55cc2dd84a85487c354f0ee1bc1b
Thanks Michael!