Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Contribution Item
Contribution Item [message #94877] Mon, 02 March 2009 20:12 Go to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
Hi,

How can I retrieve parameters from dynamic command contribution item ?
Passing a map to a Command Contribution Item make the context menu
disappear.

example:

Map<String, String> params = new HashMap<String, String>();
params.put("test", "test");
CommandContributionItemParameter addPackParams = new
CommandContributionItemParameter(
PlatformUI.getWorkbench().getActiveWorkbenchWindow(), ..., "command
ID",
params, null, null, null, "Add Package", null, "Add Package",
0, null, true);
return new IContributionItem[] { new
CommandContributionItem(addPackParams) };

I was told that use of IEvaluationContext fits well but I can't find a
good documentation about that.

Any Idea ?

thx.
Re: Contribution Item [message #94937 is a reply to message #94877] Tue, 03 March 2009 10:13 Go to previous message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
It works. It failed because I passed the name of the parameter instead
of its ID.

thx

exquisitus a ├ęcrit :
> Hi,
>
> How can I retrieve parameters from dynamic command contribution item ?
> Passing a map to a Command Contribution Item make the context menu
> disappear.
>
> example:
>
> Map<String, String> params = new HashMap<String, String>();
> params.put("test", "test");
> CommandContributionItemParameter addPackParams = new
> CommandContributionItemParameter(
> PlatformUI.getWorkbench().getActiveWorkbenchWindow(),
> ..., "command ID",
> params, null, null, null, "Add Package", null, "Add Package",
> 0, null, true);
> return new IContributionItem[] { new
> CommandContributionItem(addPackParams) };
>
> I was told that use of IEvaluationContext fits well but I can't find a
> good documentation about that.
>
> Any Idea ?
>
> thx.
Previous Topic:pdt has a hidden feature: hippie completion
Next Topic:The easy update
Goto Forum:
  


Current Time: Mon Dec 04 02:17:06 GMT 2023

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

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

Back to the top