Skip to main content


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 GerbigFriend
Messages: 702
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 WebsterFriend
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 GerbigFriend
Messages: 702
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: Thu Apr 25 20:12:22 GMT 2024

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

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

Back to the top