| commands contribution ... [message #332299] | 
Fri, 17 October 2008 10:30   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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.02862 seconds