Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2015-07-22 09:23:47 -0400
committerPablo Torregrosa Paez2015-07-22 09:24:42 -0400
commitc7f8a2f12eb2d129e66deef72df8ef934a8f72ca (patch)
tree2a2b5170598d327321198563f2a0274a4d723890
parent6a2c50443374154ad7703a91bb3079abb7082b02 (diff)
downloadorg.eclipse.tcf-c7f8a2f12eb2d129e66deef72df8ef934a8f72ca.tar.gz
org.eclipse.tcf-c7f8a2f12eb2d129e66deef72df8ef934a8f72ca.tar.xz
org.eclipse.tcf-c7f8a2f12eb2d129e66deef72df8ef934a8f72ca.zip
Target Explorer: Fix empty Process ID in Properties section.
Change-Id: I22cac468f6b9863df1128add03b8a21d70786656 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java8
2 files changed, 14 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java
index 284ead5a2..a86acdc84 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/ContextIDSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2015 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
@@ -9,6 +9,8 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+import java.math.BigInteger;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.widgets.Composite;
@@ -115,6 +117,10 @@ public class ContextIDSection extends BaseTitledSection {
this.pgrpText.setText(context == null ? "" : (context.getPGRP() >= 0 ? "" + context.getPGRP() : "")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String value = context != null && context.getPID() >= 0 ? Long.toString(context.getPID()) : ""; //$NON-NLS-1$
+ if (value==null || value.length()==0) { // BigInteger conversion
+ Object o = context.getProperties().get("PID"); //$NON-NLS-1$
+ if (o instanceof BigInteger) value = o.toString();
+ }
String value2 = delegate != null ? delegate.getText(node, "PID", value) : null; //$NON-NLS-1$
SWTControlUtil.setText(pidText, value2 != null ? value2 : value);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java
index 66bf54b6d..7ba087497 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/tabbed/IDSection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2014 Wind River Systems, Inc. and others. All rights reserved.
+ * Copyright (c) 2011, 2015 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
@@ -9,6 +9,8 @@
*******************************************************************************/
package org.eclipse.tcf.te.tcf.processes.ui.internal.tabbed;
+import java.math.BigInteger;
+
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.custom.CLabel;
import org.eclipse.swt.widgets.Composite;
@@ -108,6 +110,10 @@ public class IDSection extends BaseTitledSection {
if (label != null) SWTControlUtil.setText(ippidLabel, label);
String value = context != null && context.getPID() >= 0 ? Long.toString(context.getPID()) : ""; //$NON-NLS-1$
+ if (value==null || value.length()==0) { // BigInteger conversion
+ Object o = context.getProperties().get("PID"); //$NON-NLS-1$
+ if (o instanceof BigInteger) value = o.toString();
+ }
String value2 = delegate != null ? delegate.getText(node, "PID", value) : null; //$NON-NLS-1$
SWTControlUtil.setText(pidText, value2 != null ? value2 : value);

Back to the top