PDE [message #661642] |
Fri, 25 March 2011 16:30 |
Missing name Missing name Messages: 13 Registered: December 2010 Location: swden |
Junior Member |
|
|
Hi All,
i am working on eclipse plugins.
i am using
windows vista
java version u6update 24.
eclipse version 3.4
Build id: I20080617-2000
i want to add some of my own label to context menu . i have wrote the extension point but when i run the launcher and go to context menu i can show my label but when i click on the label it shows the following error.
"The chosen operation is currently not available "
Please help me if any body knows about it.
Thanks for your time!
the extension point is below.
<extension
point="org.eclipse.ui.commands">
<category
name="Sample Category"
id="plugins3.commands.category">
</category>
<command
name="Sample Command"
categoryId="plugins3.commands.category"
id="plugins3.commands.sampleCommand">
</command>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
commandId="plugins3.commands.sampleCommand"
class="plugins3.handlers.SampleHandler">
</handler>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="plugins3.commands.sampleCommand"
contextId="org.eclipse.ui.contexts.window"
sequence="M1+6"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
</key>
</extension>
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu?after=additions" >
<menu
label="Sample Menu"
mnemonic="M"
id="plugins3.menus.sampleMenu">
<command
commandId="plugins3.commands.sampleCommand"
mnemonic="S"
id="plugins3.menus.sampleCommand">
</command>
</menu>
</menuContribution>
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions ">
<toolbar
id="plugins3.toolbars.sampleToolbar">
<command
commandId="plugins3.commands.sampleCommand"
icon="icons/sample.gif"
tooltip="Say hello world"
id="plugins3.toolbars.sampleCommand">
</command>
</toolbar>
</menuContribution>
</extension>
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="false"
id="plugins3.popupMenu"
objectClass="org.eclipse.ui.IEditorInput">
<action
class="plugins3.handlers.SampleHandler"
definitionId="plugins3.commands.sampleCommand"
enablesFor="+"
helpContextId="identifier for he help context "
icon="icons/sample.gif"
id="plugins3.action2"
label="plugins3 Label"
tooltip="used to display plugins info">
</action>
</objectContribution>
</extension>
</plugin>
|
|
|
Powered by
FUDForum. Page generated in 0.03065 seconds