Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2004-01-07 21:14:35 +0000
committerAlain Magloire2004-01-07 21:14:35 +0000
commitb2037c5e73f254f6420705c7bdd7df0535e1c5ba (patch)
treed539e2c06405d0bb8edf93bdf146e1433aba7c87
parentcc705581355a3839ef3d753e6c2925d8b1566e15 (diff)
downloadorg.eclipse.cdt-b2037c5e73f254f6420705c7bdd7df0535e1c5ba.tar.gz
org.eclipse.cdt-b2037c5e73f254f6420705c7bdd7df0535e1c5ba.tar.xz
org.eclipse.cdt-b2037c5e73f254f6420705c7bdd7df0535e1c5ba.zip
Fix pr 49652
Show the full path of the binaries.
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog9
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java15
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java14
3 files changed, 36 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index f7bae3192f5..f54dd913ccb 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,12 @@
+2004-01-07 Alain Magloire
+
+ Fix # 49652
+ You could not see a difference with binaries of the same name but different location.
+
+ * src/org/eclipse/cdt/launch/ui/CMainTab.java
+ * src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+
+
2003-12-18 Alain Magloire
Possible NPE, PR 49146
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
index d8566c627f8..59cdbafd146 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
@@ -256,7 +256,20 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
* @return the selected binary or <code>null</code> if none.
*/
protected IBinary chooseBinary(List binList, String mode) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new CElementLabelProvider());
+ ILabelProvider provider = new CElementLabelProvider() {
+ public String getText(Object element) {
+ if (element instanceof IBinary) {
+ IBinary bin = (IBinary)element;
+ StringBuffer name = new StringBuffer();
+ name.append(bin.getPath().toString());
+ name.append(" - [" + bin.getCPU() + (bin.isLittleEndian() ? "le" : "be") + "]");
+ return name.toString();
+ }
+ return super.getText(element);
+ }
+ };
+
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), provider);
dialog.setElements(binList.toArray());
dialog.setTitle("C Local Application"); //$NON-NLS-1$
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
index 0b7539c636a..2b1a6e80d17 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java
@@ -198,7 +198,19 @@ public class CMainTab extends CLaunchConfigurationTab {
"Project must first be entered before searching for a program");
return;
}
- ILabelProvider labelProvider = new CElementLabelProvider();
+ ILabelProvider labelProvider = new CElementLabelProvider() {
+ public String getText(Object element) {
+ if (element instanceof IBinary) {
+ IBinary bin = (IBinary)element;
+ StringBuffer name = new StringBuffer();
+ name.append(bin.getPath().toString());
+ name.append(" - [" + bin.getCPU() + (bin.isLittleEndian() ? "le" : "be") + "]");
+ return name.toString();
+ }
+ return super.getText(element);
+ }
+ };
+
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(getBinaryFiles(getCProject()));
dialog.setMessage("Choose a &program to run");

Back to the top