Contribution Item [message #94877] |
Mon, 02 March 2009 15:12  |
Eclipse User |
|
|
|
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 05:13  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.02639 seconds