Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2004-02-18 03:51:31 +0000
committerAlain Magloire2004-02-18 03:51:31 +0000
commit75e82f67626c17ba5814c2c6a59cb18a34aa7de0 (patch)
tree1a350dc04a46db34fe21d9f6c17c5d6e72c8d4ad
parent45d013d2531d660fd795921905303f3dc12140f5 (diff)
downloadorg.eclipse.cdt-75e82f67626c17ba5814c2c6a59cb18a34aa7de0.tar.gz
org.eclipse.cdt-75e82f67626c17ba5814c2c6a59cb18a34aa7de0.tar.xz
org.eclipse.cdt-75e82f67626c17ba5814c2c6a59cb18a34aa7de0.zip
Use a two pane select dialog when attaching
-rw-r--r--launch/org.eclipse.cdt.launch/ChangeLog6
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java21
2 files changed, 24 insertions, 3 deletions
diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog
index 8c3d33dcaed..99467182d11 100644
--- a/launch/org.eclipse.cdt.launch/ChangeLog
+++ b/launch/org.eclipse.cdt.launch/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-17 Alain Magloire
+
+ Use a TwoPanel dialog when we attach more user friendly.
+
+ * src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
+
2004-02-17 Thomas Fletcher
Fix to address PR 52085. We allow the user to import a text file formatted
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
index 6f85722e0f8..f42d31ed767 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCLaunchConfigurationDelegate.java
@@ -27,9 +27,11 @@ import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.cdt.utils.spawner.ProcessFactory;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
@@ -38,10 +40,12 @@ import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.dialogs.TwoPaneElementSelector;
/**
* Insert the type's description here.
@@ -151,12 +155,23 @@ public class LocalCLaunchConfigurationDelegate extends AbstractCLaunchDelegate {
Display display = shell.getDisplay();
display.syncExec(new Runnable() {
public void run() {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell, new LabelProvider() {
+ ILabelProvider provider = new LabelProvider() {
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ public String getText(Object element) {
+ IProcessInfo info = (IProcessInfo)element;
+ IPath path = new Path(info.getName());
+ return path.lastSegment() + " - " + info.getPid();
+ }
+ };
+ ILabelProvider qprovider = new LabelProvider() {
public String getText(Object element) {
IProcessInfo info = (IProcessInfo) element;
- return info.getPid() + " " + info.getName();
+ return info.getName();
}
- });
+ };
+ TwoPaneElementSelector dialog = new TwoPaneElementSelector(shell, provider, qprovider);
dialog.setTitle("Select Process");
dialog.setMessage("Select a Process to attach debugger to:");
IProcessList plist = CCorePlugin.getDefault().getProcessList();

Back to the top