Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-11-17 17:30:56 +0000
committerUwe Stieber2014-11-17 17:30:56 +0000
commitc085de15965dfd4e3246be3ce652642acd753e7b (patch)
treef8caa52092ce147c73a66a0c4a0d98576d842bc3
parent06019e479816cd0323f38750a4711749e5bbfd1c (diff)
downloadorg.eclipse.tcf-c085de15965dfd4e3246be3ce652642acd753e7b.tar.gz
org.eclipse.tcf-c085de15965dfd4e3246be3ce652642acd753e7b.tar.xz
org.eclipse.tcf-c085de15965dfd4e3246be3ce652642acd753e7b.zip
Terminal: There are two Copy actions in the context menu once LinuxTools gets installed
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java
index abd1a9106..5c3644834 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/tabs/TabFolderMenuHandler.java
@@ -52,6 +52,11 @@ public class TabFolderMenuHandler extends PlatformObject {
// The list of actions available within the context menu
private final List<AbstractTerminalAction> contextMenuActions = new ArrayList<AbstractTerminalAction>();
+ // The list of invalid context menu contributions "startsWith" expressions
+ /* default */ static final String[] INVALID_CONTRIBUTIONS_STARTS_WITH = {
+ "org.eclipse.cdt", "org.eclipse.ui.edit" //$NON-NLS-1$ //$NON-NLS-2$
+ };
+
/**
* Default menu listener implementation.
*/
@@ -88,8 +93,13 @@ public class TabFolderMenuHandler extends PlatformObject {
IContributionItem[] items = manager.getItems();
for (IContributionItem item : items) {
String id = item.getId();
- if (id != null && id.startsWith("org.eclipse.cdt")) { //$NON-NLS-1$
- manager.remove(item);
+ if (id != null) {
+ for (String prefix : INVALID_CONTRIBUTIONS_STARTS_WITH) {
+ if (id.startsWith(prefix)) {
+ manager.remove(item);
+ break;
+ }
+ }
}
}
}

Back to the top