Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml44
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java3
2 files changed, 45 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
index 586d831ab..4553cfd03 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml
@@ -316,8 +316,48 @@
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.importexport">
- <command commandId="org.eclipse.ui.file.import"/>
- <command commandId="org.eclipse.ui.file.export"/>
+ <command
+ commandId="org.eclipse.ui.file.import">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.ui.file.import"
+ value="true"/>
+ </or>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.ui.file.export">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate operator="and" ifEmpty="false">
+ <or>
+ <not>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.tcf.te.runtime.services.hasService"
+ value="org.eclipse.tcf.te.runtime.services.interfaces.IMenuService"/>
+ </not>
+ <test
+ property="org.eclipse.tcf.te.runtime.services.menu.isVisible"
+ args="org.eclipse.ui.file.export"
+ value="true"/>
+ </or>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.tcf.te.ui.views.View#Popup?after=group.showIn">
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
index 3c3204603..6fa227c34 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/internal/services/MenuService.java
@@ -28,6 +28,9 @@ public class MenuService extends AbstractService implements IMenuService {
if (contributionID.endsWith("menu.showIn")) { //$NON-NLS-1$
return false;
}
+ if (contributionID.endsWith("file.import") || contributionID.endsWith("file.export")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
}
return true;

Back to the top