Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to add parameters to CommandContributionItemParameter
How to add parameters to CommandContributionItemParameter [message #734307] Fri, 07 October 2011 12:14 Go to next message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

I want to add parameters to a CommandContributionItemParameter. I have the following code:

Map<String, Object> commandParamametersMap = new HashMap<String, Object>();
commandParamametersMap.put("name",  object);
param.parameters = commandParamametersMap;


This does not throw an Exception but the CommandContributionItem I create from this paramater is not displayed in the context menu. It is displayed when not passing parameters to it. Is there a convenient way to pass parameters to my CommandContributionItemParameter?

Ralph
Re: How to add parameters to CommandContributionItemParameter [message #753484 is a reply to message #734307] Thu, 27 October 2011 12:49 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

How is your command defined? You can only pass an object into it if that object is a String, or you define a parameter converter.

PW


Re: How to add parameters to CommandContributionItemParameter [message #753487 is a reply to message #753484] Thu, 27 October 2011 12:58 Go to previous message
Ralph Gerbig is currently offline Ralph Gerbig
Messages: 697
Registered: November 2009
Senior Member
Hi,

I found out that I need to have parameters connected to my command in plugin.xml. These ones I connected to parameter converters. This works fine for me. Thanks for
your reply.

Ralph
Previous Topic:Parameterized commands and key bindings
Next Topic:Global IStatusLineManager.setMessage(...)
Goto Forum:
  


Current Time: Tue Oct 21 10:33:51 GMT 2014

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

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