commands contribution ... [message #332299] |
Fri, 17 October 2008 14:30 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Carmelo ![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=carmeloscala%40hotmail.com) Messages: 224 Registered: July 2009 |
Senior Member |
|
|
Hi all,
I have a question on commands added to a menu via CompoundContributionItem
I do use this way to display each time a different list of command/action
depending on some status of my plugin to a view context menu.
The question is:
protected IContributionItem[] getContributionItems()
let me return a list of CommandContributionItem
for (int i = 0; i < size; i++)
{
listCommands[i] = new
CommandContributionItem(PlatformUI.getWorkbench().getActiveW orkbenchWindow(),
scriptsName[i], "my.project.myCommand",
Collections.emptyMap(), null, null, null, scriptsName [i] , null,
null, SWT.NONE);
}
I guess there is a way to pass parameter to this command that can be used
later by the handler ... but how to do this?
this could be probably the map ... but how to use it? trying to put some
value to the hash map gives an error during the creation command.
I'm using eclise 3.3.2 (I have seen that in 3.4 things are lil different)
Thanks
Kar
|
|
|
|
Powered by
FUDForum. Page generated in 0.03421 seconds