[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] How to get action id string from plugin.xml file???
|
Hello,
I'm trying to get to the action id string defined in my plugin.xml from
my code, but instead of receiving the action id defined in the
plugin.xml file, I'm getting a different action id.
Shouldn't the action id returned by the action.getId() method be the
same as the action id defined in the plugin.xml file? Is this a bug?
How can I get the action id string from the plugin.xml file?
Here's a snippet of the code from my action class that I'm using to get
the action id string:
public void run(IAction action)
{
String actionId = action.getId();
String actionText = action.getText();
Log.log(this, "action id: "+actionId);
Log.log(this, "action text: "+actionText);
}
Here's what is being logged:
13:06:42.968 com.ibm.voicetools.browser.LaunchBrowserFromNavigator
action id: PluginAction.19
13:06:42.968 com.ibm.voicetools.browser.LaunchBrowserFromNavigator
action text: Run in Audio Mode
13:06:48.325 com.ibm.voicetools.browser.LaunchBrowserFromNavigator
action id: PluginAction.18
13:06:48.335 com.ibm.voicetools.browser.LaunchBrowserFromNavigator
action text: Run in Text Mode
13:06:52.481 com.ibm.voicetools.browser.LaunchBrowserFromProject action
id: PluginAction.3
13:06:52.481 com.ibm.voicetools.browser.LaunchBrowserFromProject action
text: Run in Audio Mode
13:06:56.567 com.ibm.voicetools.browser.LaunchBrowserFromProject action
id: PluginAction.2
13:06:56.567 com.ibm.voicetools.browser.LaunchBrowserFromProject action
text: Run in Text Mode
And, here's a snippet of my plugin.xml file where it defines the two
actions sets (the items that show up in the Project pull down menu) and
the two popup menu actions:
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
id="com.ibm.voicetools.browser.popupMenu1"
objectClass="org.eclipse.core.resources.IFile"
nameFilter="*.vxm*">
<action
id="com.ibm.voicetools.browser.text.popupmenu"
label="%RunTextMode.label"
menubarPath="additions"
icon="icons/run.gif"
class="com.ibm.voicetools.browser.LaunchBrowserFromNavigator"
enablesFor="1">
</action>
<action
id="com.ibm.voicetools.browser.audio.popupmenu"
label="%RunAudioMode.label"
menubarPath="additions"
icon="icons/run.gif"
class="com.ibm.voicetools.browser.LaunchBrowserFromNavigator"
enablesFor="1">
</action>
</objectContribution>
</extension>
<extension
point="org.eclipse.ui.actionSets">
<actionSet
id="com.ibm.voicetools.browser.BrowserActionSet"
label="Browser"
visible="true"
description="Browser Action Set">
<action id="com.ibm.voicetools.browser.text.projectmenu"
menubarPath="workbench/wbEnd"
label="%RunTextMode.label"
icon="icons/run.gif"
class="com.ibm.voicetools.browser.LaunchBrowserFromProject"
enablesFor="1">
<selection class="org.eclipse.core.resources.IFile" name="*.vxm*"/>
</action>
<action id="com.ibm.voicetools.browser.audio.projectmenu"
menubarPath="workbench/wbEnd"
label="%RunAudioMode.label"
icon="icons/run.gif"
class="com.ibm.voicetools.browser.LaunchBrowserFromProject"
enablesFor="1">
<selection class="org.eclipse.core.resources.IFile" name="*.vxm*"/>
</action>
</actionSet>
</extension>
Thanks for your help.
--
Miriam Ford
IBM, Voice Systems Development
8051 Congress Avenue
Boca Raton, Florida 33487
(561)862-3304, T/L 975-3304
email: miriamf@xxxxxxxxxx