Eclipse plugin 调用处理程序时从executionEvent获取当前选定的参数

Eclipse plugin 调用处理程序时从executionEvent获取当前选定的参数,eclipse-plugin,eclipse-rcp,Eclipse Plugin,Eclipse Rcp,我在网上找不到关于这个的任何信息,所以我决定在这里询问。 我在我的rcp plugin.xml中声明了一个命令的处理程序 <extension point="org.eclipse.ui.commands"> <command categoryId="test.category.id" id="com.test.Handler" defaultHandler="com.test.Handler" name="Create Zip" > <c

我在网上找不到关于这个的任何信息,所以我决定在这里询问。 我在我的rcp plugin.xml中声明了一个命令的处理程序

<extension point="org.eclipse.ui.commands">
 <command 
  categoryId="test.category.id"
  id="com.test.Handler"
  defaultHandler="com.test.Handler"
  name="Create Zip" >
   <commandParameter
    id="com.param.Params"
    name="zip"
    values="com.param.Params">
   </commandParameter>
 </command>
</extension>

我将这些类添加到我的项目中。处理程序实现方法
AbstractHandler.execute(ExecutionEvent事件)
,参数表示我要调用的不同选项
FormatActionParameters.getParameterValues()
。如果按下快捷方式,则事件为fire

但是当它被激发时,我无法确定处理程序中使用了哪个参数。ExecutionEvent仅包含完整的参数列表,而不包含所选参数


我的问题是:如何跟踪命令的来源。我需要知道选择了什么。

首先我想,调用
event.getParameter(“my.key.from.the.plugin”)
将为我提供包含所有键的整个命令。在调试过程中,我看到这个调用将为我提供所需的参数。

我没有使用这些参数,但查看各种Eclipse内部处理程序,它们似乎都只是调用
ExecutionEvent.getParameter(id)