Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-05-02 07:20:56 -0400
committerUwe Stieber2012-05-02 07:37:35 -0400
commit82dba9bf83929c40e1a11b3453fdb630c248a630 (patch)
tree1bf4a875214f5575c759028c5c4b14291d6cc221 /target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
parent86e0ea52f2f9bf83b690371b8b68f64594b38208 (diff)
downloadorg.eclipse.tcf-82dba9bf83929c40e1a11b3453fdb630c248a630.tar.gz
org.eclipse.tcf-82dba9bf83929c40e1a11b3453fdb630c248a630.tar.xz
org.eclipse.tcf-82dba9bf83929c40e1a11b3453fdb630c248a630.zip
Target Explorer: Rework delete handler contributions
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml70
1 files changed, 63 insertions, 7 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
index 6346cb378..82e3fa2e1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.ui/plugin.xml
@@ -362,10 +362,9 @@
<iterate
ifEmpty="false"
operator="and">
- <test
- property="org.eclipse.tcf.te.ui.views.isDeletableElement"
- value="true">
- </test>
+ <instanceof
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
+ </instanceof>
</iterate>
</with>
</visibleWhen>
@@ -549,6 +548,28 @@
</visibleWhen>
</command>
</menuContribution>
+ <menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.delete">
+ <command
+ commandId="org.eclipse.ui.edit.delete"
+ disabledIcon="platform:/plugin/org.eclipse.ui/icons/full/dtool16/delete.gif"
+ helpContextId="org.eclipse.tcf.te.ui.command_Delete"
+ icon="platform:/plugin/org.eclipse.ui/icons/full/etool16/delete.gif"
+ id="org.eclipse.tcf.te.ui.commands.delete"
+ label="%command.delete.label"
+ mnemonic="D"
+ style="push"
+ tooltip="%command.delete.description">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <count value="+"/>
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"/>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+
<menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.properties">
<command
commandId="org.eclipse.ui.file.properties"
@@ -936,6 +957,13 @@
properties="isEditorActivation"
type="org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent">
</propertyTester>
+ <propertyTester
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.TreeNodePropertyTester"
+ namespace="org.eclipse.tcf.te.tcf.filesystem"
+ properties="canDelete"
+ type="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
+ </propertyTester>
</extension>
<!-- Command contributions -->
@@ -1565,6 +1593,37 @@
class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.RefreshViewerHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.refreshViewer">
</handler>
+
+ <handler
+ commandId="org.eclipse.ui.edit.delete"
+ class="org.eclipse.tcf.te.tcf.ui.handler.DeleteHandler">
+ <activeWhen>
+ <and>
+ <with variable="activePartId">
+ <or>
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </or>
+ </with>
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"/>
+ </iterate>
+ </with>
+ </and>
+ </activeWhen>
+ <enabledWhen>
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <test
+ property="org.eclipse.tcf.te.tcf.filesystem.canDelete"
+ value="true">
+ </test>
+ </iterate>
+ </with>
+ </enabledWhen>
+ </handler>
+
</extension>
<!-- Decorator contributions -->
@@ -1667,9 +1726,6 @@
type="org.eclipse.tcf.te.ui.views.interfaces.handler.IRefreshHandlerDelegate">
</adapter>
<adapter
- type="org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate">
- </adapter>
- <adapter
type="org.eclipse.ui.IPersistableElement">
</adapter>
</factory>

Back to the top