Default Cut/Copy/Paste/Rename/DeleteCommands disabled [message #695687] |
Tue, 12 July 2011 06:24  |
Eclipse User |
|
|
|
Hi everybody,
in my RCP application I use a CNF Navigator to display my workspace resources. It is configured using ResourcesPlugin.getWorkspace().getRoot() as RootElement and thus displays IResources. I successfully added several filters, sorters etc and extended the PopUpMenu with some custom commands. Everything works fine so far.
What I can not get working are the default commands to cut/copy/paste/rename/delete resources. Which means they are added to the menu but never get active, so I can't use them. On the other hand I use the NavigatorView the according commands are enabled on my resources and work as expected.
This is the code I used in plugin.xml to add the commands
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:{popupMenu.location}?after=group.edit">
<command
commandId="org.eclipse.ui.edit.delete"
id="cnf.popupmenu.delete"
label="Delete"
mnemonic="D"
style="push">
</command>
<command
commandId="org.eclipse.ui.edit.rename"
id="cnf.popupmenu.rename"
label="Rename"
mnemonic="R"
style="push">
</command>
</menuContribution>
</extension>
So my question is how to enable these commands?
I found some advice to add Handlers for that, but this allways included writing an own handler, which is not exactly what I want.
I thought a default handler would be added by the defining plugin that works on IResources.
If explicit adding of a Handler is required where do I find the alredy existing handlers to reference them?
Thanks in advance,
Alexander
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03122 seconds