Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-11-04 11:13:56 -0500
committerUwe Stieber2013-11-04 11:19:00 -0500
commitf7783fb7a66710b21cf17ddf37977fcc27d78a73 (patch)
treee978a06b7e49195c28ddff4ee1d17f565a26ebda
parent72a6703f577922374bbac8b89ff4d8a81bedbf0e (diff)
downloadorg.eclipse.tcf-f7783fb7a66710b21cf17ddf37977fcc27d78a73.tar.gz
org.eclipse.tcf-f7783fb7a66710b21cf17ddf37977fcc27d78a73.tar.xz
org.eclipse.tcf-f7783fb7a66710b21cf17ddf37977fcc27d78a73.zip
Target Explorer: Several process monitor fixes
- Remove unused column comparator implementations - Remove "Properties" from context menu of process monitor editor page - Provide consistent "Show In > Properties" - Remove Alt+Shift+W shortcut definition from "Show In" (does not work)
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/eview16/prop_ps.gifbin0 -> 343 bytes
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml66
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/CommandLineComparator.java82
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDComparator.java47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PPIDComparator.java47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/StateComparator.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/UserComparator.java52
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java31
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.xml15
11 files changed, 73 insertions, 329 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/eview16/prop_ps.gif b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/eview16/prop_ps.gif
new file mode 100644
index 000000000..d11c996e5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/icons/eview16/prop_ps.gif
Binary files differ
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
index 8ec50b176..18b10e9d6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.properties
@@ -62,8 +62,7 @@ propertyTab.advanced.label = Properties
command.refresh.label=Refresh
command.refresh.tooltip=Refresh the selected node
-command.properties.label.0 = Properties
-command.properties.label.1 = Properties
+command.properties.label = Properties
page.properties.name = Properties
page.context.name = Context
@@ -78,3 +77,6 @@ command.filter.label=Filter...
command.reset.label = Reset Filter
command.search.label = Find...
+
+ShowIn.menu.name=Show In
+Properties.menu.name=Properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
index f073f9d1a..367628a02 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/plugin.xml
@@ -280,6 +280,25 @@
<menuContribution locationURI="popup:org.eclipse.tcf.te.tcf.processes.ui.ProcessExplorerEditorPage?after=additions">
<separator
+ name="group.showIn"
+ visible="true">
+ </separator>
+ <menu
+ id="org.eclipse.tcf.te.launch.ui.editor.menu.showIn"
+ label="%ShowIn.menu.name">
+ <command
+ commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
+ id="org.eclipse.tcf.te.launch.ui.editor.commands.showInProperties"
+ icon="icons/eview16/prop_ps.gif"
+ label="%Properties.menu.name"
+ style="push">
+ <visibleWhen>
+ <reference definitionId="te.expressions.processes.isProcessTreeNode"/>
+ </visibleWhen>
+ </command>
+ <visibleWhen checkEnabled="true"/>
+ </menu>
+ <separator
name="group.launch.rundebug"
visible="true">
</separator>
@@ -344,6 +363,15 @@
commandId="org.eclipse.tcf.te.ui.views.command.find"
label="%command.search.label"
style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.ui.interfaces.ISearchable">
+ <instanceof value="org.eclipse.tcf.te.ui.interfaces.ISearchable"/>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
</command>
<separator
name="group.filter"
@@ -353,31 +381,31 @@
commandId="org.eclipse.tcf.te.ui.views.command.quickfilter"
label="%command.filter.label"
style="push">
+ <visibleWhen checkEnabled="false">
+ <with variable="selection">
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
+ <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
+ </adapt>
+ </iterate>
+ </with>
+ </visibleWhen>
</command>
<command
commandId="org.eclipse.tcf.te.ui.views.command.resetfilter"
label="%command.reset.label"
style="push">
- </command>
- <separator
- name="group.properties"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.ui.file.properties"
- id="properties"
- label="%command.properties.label.0">
- <visibleWhen>
+ <visibleWhen checkEnabled="false">
<with variable="selection">
- <count value="1"/>
- <iterate ifEmpty="false" operator="and">
- <instanceof value="org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode"/>
+ <iterate>
+ <adapt type="org.eclipse.tcf.te.core.interfaces.IFilterable">
+ <instanceof value="org.eclipse.tcf.te.core.interfaces.IFilterable"/>
+ </adapt>
</iterate>
</with>
</visibleWhen>
</command>
</menuContribution>
-
</extension>
<!-- Command contributions -->
@@ -602,7 +630,6 @@
</viewer>
<columnContribution viewerId="org.eclipse.tcf.te.ui.controls.viewer.processes">
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.ProcessComparator"
id="name"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.navigator.runtime.LabelProviderDelegate"
moveable="true"
@@ -619,7 +646,6 @@
</activation>
</column>
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.PIDComparator"
id="pid"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.PIDLabelProvider"
moveable="true"
@@ -636,7 +662,6 @@
</activation>
</column>
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.PPIDComparator"
id="ppid"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.PPIDLabelProvider"
moveable="true"
@@ -653,7 +678,6 @@
</activation>
</column>
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.StateComparator"
id="state"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.StateLabelProvider"
moveable="true"
@@ -670,7 +694,6 @@
</activation>
</column>
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.UserComparator"
id="user"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.UserLabelProvider"
moveable="true"
@@ -687,7 +710,6 @@
</activation>
</column>
<column
- comparator="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.CommandLineComparator"
id="cmdline"
labelProvider="org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns.CommandLineLabelProvider"
moveable="true"
@@ -714,7 +736,9 @@
name="%singlethreadfilter.name">
<activation>
<with variable="input">
- <test property="processMonitor.delegatedActivation.isFilterActive" args="singleThread" value="true"/>
+ <adapt type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ <test property="processMonitor.delegatedActivation.isFilterActive" args="singleThread" value="true"/>
+ </adapt>
</with>
</activation>
</filter>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/CommandLineComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/CommandLineComparator.java
deleted file mode 100644
index f27a9194c..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/CommandLineComparator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNodeProperties;
-
-/**
- * The comparator for the tree column "Command Line".
- */
-public class CommandLineComparator implements Comparator<IProcessContextNode> , Serializable {
- private static final long serialVersionUID = 1L;
-
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(final IProcessContextNode o1, final IProcessContextNode o2) {
- final AtomicReference<String> cmd1 = new AtomicReference<String>();
- final AtomicReference<String> cmdArgs1 = new AtomicReference<String>();
- final AtomicReference<String> cmd2 = new AtomicReference<String>();
- final AtomicReference<String> cmdArgs2 = new AtomicReference<String>();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- String[] cmdline1 = (String[])o1.getProperty(IProcessContextNodeProperties.PROPERTY_CMD_LINE);
- if (cmdline1 != null && cmdline1.length > 0) {
- cmd1.set(cmdline1[0]);
- String[] args = new String[cmdline1.length - 1];
- System.arraycopy(cmdline1, 1, args, 0, cmdline1.length - 1);
- cmdArgs1.set(CommandLineLabelProvider.makeString(args));
- }
-
- String[] cmdline2 = (String[])o2.getProperty(IProcessContextNodeProperties.PROPERTY_CMD_LINE);
- if (cmdline2 != null && cmdline2.length > 0) {
- cmd2.set(cmdline2[0]);
- String[] args = new String[cmdline2.length - 1];
- System.arraycopy(cmdline2, 1, args, 0, cmdline2.length - 1);
- cmdArgs2.set(CommandLineLabelProvider.makeString(args));
- }
- }
- };
-
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- if (cmd1.get() == null) {
- if (cmd2.get() == null) return 0;
- return -1;
- }
- if (cmd2.get() == null) return 1;
-
- // Compare the commands first
- int result = cmd1.get().compareTo(cmd2.get());
- // If equal, compare the arguments
- if (result == 0) {
- if (cmdArgs1.get() == null) {
- if (cmdArgs2.get() == null) return 0;
- return -1;
- }
- if (cmdArgs2.get() == null) return 1;
-
- result = cmdArgs1.get().compareTo(cmdArgs2.get());
- }
-
- return result;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDComparator.java
deleted file mode 100644
index 763d392cb..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PIDComparator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-
-/**
- * The comparator for the tree column "PID".
- */
-public class PIDComparator implements Comparator<IProcessContextNode>, Serializable {
- private static final long serialVersionUID = 1L;
-
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(final IProcessContextNode o1, final IProcessContextNode o2) {
- final AtomicLong pid1 = new AtomicLong();
- final AtomicLong pid2 = new AtomicLong();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- pid1.set(o1.getSysMonitorContext().getPID());
- pid2.set(o2.getSysMonitorContext().getPID());
- }
- };
-
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- return pid1.get() == pid2.get() ? 0 : (pid1.get() < pid2.get() ? -1 : 1);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PPIDComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PPIDComparator.java
deleted file mode 100644
index 8c0c8564c..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/PPIDComparator.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-
-/**
- * The comparator for the tree column "PPID".
- */
-public class PPIDComparator implements Comparator<IProcessContextNode>, Serializable {
- private static final long serialVersionUID = 1L;
-
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(final IProcessContextNode o1, final IProcessContextNode o2) {
- final AtomicLong ppid1 = new AtomicLong();
- final AtomicLong ppid2 = new AtomicLong();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- ppid1.set(o1.getSysMonitorContext().getPPID());
- ppid2.set(o2.getSysMonitorContext().getPPID());
- }
- };
-
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- return ppid1.get() == ppid2.get() ? 0 : (ppid1.get() < ppid2.get() ? -1 : 1);
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/StateComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/StateComparator.java
deleted file mode 100644
index 57730143d..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/StateComparator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-
-/**
- * The comparator for the tree column "state".
- */
-public class StateComparator implements Comparator<IProcessContextNode> , Serializable {
- private static final long serialVersionUID = 1L;
-
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(final IProcessContextNode o1, final IProcessContextNode o2) {
- final AtomicReference<String> state1 = new AtomicReference<String>();
- final AtomicReference<String> state2 = new AtomicReference<String>();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- state1.set(o1.getSysMonitorContext().getState());
- state2.set(o2.getSysMonitorContext().getState());
- }
- };
-
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- if (state1.get() == null) {
- if (state2.get() == null) return 0;
- return -1;
- }
- if (state2.get() == null) return 1;
- return state1.get().compareTo(state2.get());
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/UserComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/UserComparator.java
deleted file mode 100644
index f517dcb91..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/editor/tree/columns/UserComparator.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.processes.ui.editor.tree.columns;
-
-import java.io.Serializable;
-import java.util.Comparator;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.processes.core.model.interfaces.IProcessContextNode;
-
-/**
- * The comparator for the tree column "user".
- */
-public class UserComparator implements Comparator<IProcessContextNode> , Serializable {
- private static final long serialVersionUID = 1L;
-
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
- @Override
- public int compare(final IProcessContextNode o1, final IProcessContextNode o2) {
- final AtomicReference<String> username1 = new AtomicReference<String>();
- final AtomicReference<String> username2 = new AtomicReference<String>();
-
- Runnable runnable = new Runnable() {
- @Override
- public void run() {
- username1.set(o1.getSysMonitorContext().getUserName());
- username2.set(o2.getSysMonitorContext().getUserName());
- }
- };
-
- Assert.isTrue(!Protocol.isDispatchThread());
- Protocol.invokeAndWait(runnable);
-
- if (username1.get() == null) {
- if (username2.get() == null) return 0;
- return -1;
- }
- if (username2.get() == null) return 1;
- return username1.get().compareTo(username2.get());
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java
index 2082cfd5f..018e6b12c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.terminals/src/org/eclipse/tcf/te/ui/terminals/manager/ConsoleManager.java
@@ -517,21 +517,22 @@ public class ConsoleManager {
Assert.isNotNull(connector);
IWorkbenchPage page = getActiveWorkbenchPage();
-
- IViewReference[] refs = page.getViewReferences();
- for (int i = 0; i < refs.length; i++) {
- IViewReference ref = refs[i];
- if (ref.getId().equals(id)) {
- IViewPart part = ref.getView(true);
- if (part instanceof ITerminalsView) {
- // Get the tab folder manager associated with the view
- TabFolderManager manager = (TabFolderManager) part.getAdapter(TabFolderManager.class);
- if (manager == null) {
- continue;
- }
- CTabItem item = manager.findTabItem(title, connector, data);
- if (item != null) {
- return item;
+ if (page != null) {
+ IViewReference[] refs = page.getViewReferences();
+ for (int i = 0; i < refs.length; i++) {
+ IViewReference ref = refs[i];
+ if (ref.getId().equals(id)) {
+ IViewPart part = ref.getView(true);
+ if (part instanceof ITerminalsView) {
+ // Get the tab folder manager associated with the view
+ TabFolderManager manager = (TabFolderManager) part.getAdapter(TabFolderManager.class);
+ if (manager == null) {
+ continue;
+ }
+ CTabItem item = manager.findTabItem(title, connector, data);
+ if (item != null) {
+ return item;
+ }
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
index cd7e13307..258e5bded 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/plugin.properties
@@ -47,9 +47,9 @@ command.open.mnemonic=O
command.open.tooltip=Open the selection
menu.showIn.label = Show In
-menu.properties.label = Properties
+menu.showIn.properties.label = Properties
-command.showInProperties.label = Show In Properties
+command.showInProperties.name = Show In Properties
command.refresh.label=Refresh
command.refresh.description=Refresh the selected node
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 7ff3f2f38..de39efb35 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
@@ -433,7 +433,7 @@
<command
commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
icon="icons/eview16/prop_ps.gif"
- label="%menu.properties.label"
+ label="%menu.showIn.properties.label"
style="push">
</command>
</menu>
@@ -579,7 +579,7 @@
categoryId="org.eclipse.tcf.te.ui.commands.category"
helpContextId="org.eclipse.tcf.te.ui.views.command_ShowInProperties"
id="org.eclipse.tcf.te.ui.views.command.ShowInProperties"
- name="%command.showInProperties.label">
+ name="%command.showInProperties.name">
</command>
<command
categoryId="org.eclipse.tcf.te.ui.commands.category"
@@ -651,12 +651,6 @@
<extension point="org.eclipse.ui.bindings">
<key
- commandId="org.eclipse.tcf.te.ui.views.command.ShowInGroup"
- contextId="org.eclipse.tcf.te.ui.views.View"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="M3+M2+W">
- </key>
- <key
commandId="org.eclipse.tcf.te.ui.views.command.find"
contextId="org.eclipse.tcf.te.ui.views.View"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
@@ -768,7 +762,10 @@
commandId="org.eclipse.tcf.te.ui.views.command.ShowInProperties">
<activeWhen>
<with variable="activePartId">
- <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ <or>
+ <equals value="org.eclipse.tcf.te.ui.views.View"/>
+ <equals value="org.eclipse.tcf.te.ui.views.Editor"/>
+ </or>
</with>
</activeWhen>
</handler>

Back to the top