Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2020-08-13 00:22:38 +0000
committerEugene Tarassov2020-08-13 00:22:38 +0000
commit3c358547a99147b8477a5b1632cae0c740e452a8 (patch)
tree7dfb5ac293059f22652e58c8c134a895751dff5c /plugins
parent874e85b2b45b238404d6b8e11b80fda8a3425677 (diff)
downloadorg.eclipse.tcf-3c358547a99147b8477a5b1632cae0c740e452a8.tar.gz
org.eclipse.tcf-3c358547a99147b8477a5b1632cae0c740e452a8.tar.xz
org.eclipse.tcf-3c358547a99147b8477a5b1632cae0c740e452a8.zip
Bug 565993 - Modules view with dedicated module name column
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java6
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java14
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java
index 788634f3e..9e22536ff 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFColumnPresentationModules.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2011-2020 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 2.0
* which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ public class TCFColumnPresentationModules implements IColumnPresentation {
*/
public static final String
COL_NAME = "Name",
+ COL_FILE = "File",
COL_ADDRESS = "Address",
COL_SIZE = "Size",
COL_FLAGS = "Flags",
@@ -34,6 +35,7 @@ public class TCFColumnPresentationModules implements IColumnPresentation {
private static String[] cols_all = {
COL_NAME,
+ COL_FILE,
COL_ADDRESS,
COL_SIZE,
COL_FLAGS,
@@ -42,6 +44,7 @@ public class TCFColumnPresentationModules implements IColumnPresentation {
};
private static String[] headers = {
+ "Name",
"File Name",
"Address",
"Size",
@@ -52,6 +55,7 @@ public class TCFColumnPresentationModules implements IColumnPresentation {
private static String[] cols_ini = {
COL_NAME,
+ COL_FILE,
COL_ADDRESS,
COL_SIZE
};
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
index e7c455e21..52844a95d 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeModule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011, 2015 Wind River Systems, Inc. and others.
+ * Copyright (c) 2011-2020 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 2.0
* which accompanies this distribution, and is available at
@@ -76,9 +76,19 @@ public class TCFNodeModule extends TCFNode implements IDetailsProvider {
update.setLabel(r.getFileName(), 0);
}
else {
- for (int i=0; i < col_ids.length; ++i) {
+ for (int i = 0; i < col_ids.length; i++) {
String col_id = col_ids[i];
if (TCFColumnPresentationModules.COL_NAME.equals(col_id)) {
+ String name = r.getFileName();
+ if (name != null) {
+ int j0 = name.lastIndexOf('/');
+ int j1 = name.lastIndexOf('\\');
+ if (j0 > j1) name = name.substring(j0 + 1);
+ else if (j0 < j1) name = name.substring(j1 + 1);
+ }
+ update.setLabel(name, i);
+ }
+ else if (TCFColumnPresentationModules.COL_FILE.equals(col_id)) {
update.setLabel(r.getFileName(), i);
}
else if (TCFColumnPresentationModules.COL_ADDRESS.equals(col_id)) {

Back to the top