override global delete command handler [message #657122] |
Tue, 01 March 2011 16:12 |
Eclipse User |
|
|
|
Originally posted by: tmicko.gmail.com
I'm developing a plugin that uses the standard project explorer view and
I want to replace the default "delete" handler. My plugim.xml file
contains the following handler:
<handler
class="com.MyHandler"
commandId="org.eclipse.ui.edit.delete">
<activeWhen>
<with variable="selection">
<iterate operator="or">
<and>
<instanceof value="org.eclipse.core.resources.IResource"/>
<test property="org.eclipse.core.resources.projectNature"
value="myNature"/>
</and>
</iterate>
</with>
</activeWhen>
</handler>
The handler works correctly :
1- in the Edit/Delete menu
2- or when I press the Delete key (via key binding)
However, when I right click on a resource in Project Explorer and click
on the Delete popup menu item, my handler is ignored and the default
handler is called. Why is my handler ignored when the delete command is
called from the context menu of the project explorer and works correctly
from menu and key binding?
Any help will be appreciated. Thank You.
Tomas
|
|
|
Re: override global delete command handler [message #657260 is a reply to message #657122] |
Wed, 02 March 2011 08:22 |
Eclipse User |
|
|
|
Originally posted by: tmicko.gmail.com
I have also tried various handler definitions, e.g.
with variable "activeMenuSelection" but in that case the handler never
gets called,
or with activePartId - the same behaviour as with variable
"activeSelection".
Tomas
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds