Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorAlain Magloire2004-01-07 16:02:50 -0500
committerAlain Magloire2004-01-07 16:02:50 -0500
commit081264bae4fae8a36bd7ed3342f1214a82fd4db1 (patch)
tree102ad8b1acc02b32d011f7f992abf92a9f4f4c11 /launch
parent41a0020d24a9badd0e876e80e6bb44d3ea896494 (diff)
downloadorg.eclipse.cdt-081264bae4fae8a36bd7ed3342f1214a82fd4db1.tar.gz
org.eclipse.cdt-081264bae4fae8a36bd7ed3342f1214a82fd4db1.tar.xz
org.eclipse.cdt-081264bae4fae8a36bd7ed3342f1214a82fd4db1.zip
Fix Pr 49652.
Show the full path of the binaries.
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog8
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java17
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java14
3 files changed, 37 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index e8571009ce..6b1ce94813 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,11 @@
+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 d8566c627f..71a0336c38 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
@@ -34,9 +34,11 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
@@ -256,7 +258,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 0b7539c636..2b1a6e80d1 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