Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2012-05-11 09:55:12 -0400
committerMarc Khouzam2012-05-11 10:19:05 -0400
commit83f58de250b345f4800b39ddc21a540a060e9511 (patch)
tree27b604378923f8fc8d39cd544f5f3afdc029020b /dsf-gdb
parent8970c47b9b97ec6dc3ba86a1d2168062985524b9 (diff)
downloadorg.eclipse.cdt-83f58de250b345f4800b39ddc21a540a060e9511.tar.gz
org.eclipse.cdt-83f58de250b345f4800b39ddc21a540a060e9511.tar.xz
org.eclipse.cdt-83f58de250b345f4800b39ddc21a540a060e9511.zip
Bug 378418: Process name should be shown in Debug view according to the "Show Full Path" option
Change-Id: I75d90f243cf99cb7780462c3b003c6942abe6683 Reviewed-on: https://git.eclipse.org/r/5944 Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com> Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
index 867fab2860..9ba91cfb4f 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ContainerVMNode.java
@@ -9,6 +9,7 @@
* Ericsson - Initial API and implementation
* Wind River Systems - Factored out AbstractContainerVMNode
* Patrick Chuong (Texas Instruments) - Add support for icon overlay in the debug view (Bug 334566)
+ * Marc Khouzam (Ericsson) - Respect the "Show Full Path" option for the process name (Bug 378418)
*******************************************************************************/
package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch;
@@ -32,6 +33,7 @@ import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IExecutionDMContext;
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService;
import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlShutdownDMEvent;
+import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.AbstractContainerVMNode;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ExecutionContextLabelText;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.launch.ILaunchVMConstants;
@@ -55,6 +57,7 @@ import org.eclipse.cdt.dsf.ui.viewmodel.properties.PropertiesBasedLabelProvider;
import org.eclipse.cdt.dsf.ui.viewmodel.properties.VMDelegatingPropertiesUpdate;
import org.eclipse.cdt.ui.CDTSharedImages;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
@@ -320,7 +323,14 @@ public class ContainerVMNode extends AbstractContainerVMNode
}
protected void fillThreadDataProperties(IPropertiesUpdate update, IThreadDMData data) {
- update.setProperty(PROP_NAME, data.getName());
+ String fileName = data.getName();
+ if (fileName != null) {
+ Object showFullPathPreference = getVMProvider().getPresentationContext().getProperty(IDsfDebugUIConstants.DEBUG_VIEW_SHOW_FULL_PATH_PROPERTY);
+ if (showFullPathPreference instanceof Boolean && (Boolean)showFullPathPreference == false) {
+ fileName = new Path(fileName).lastSegment();
+ }
+ }
+ update.setProperty(PROP_NAME, fileName);
update.setProperty(ILaunchVMConstants.PROP_ID, data.getId());
String coresStr = null;

Back to the top