override global delete command handler [message #657122] |
Tue, 01 March 2011 11: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
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.18017 seconds