Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2009-02-27 22:38:54 +0000
committerPawel Piech2009-02-27 22:38:54 +0000
commitb006bc98c3abca8ba53bd7c5132ccd0d883703c2 (patch)
tree6ac8e9d3a24676c0e58b157f0ebc6f3033377ad8
parent22b507266d6d249da439d6b8bb351df43be9fa4c (diff)
downloadorg.eclipse.cdt-b006bc98c3abca8ba53bd7c5132ccd0d883703c2.tar.gz
org.eclipse.cdt-b006bc98c3abca8ba53bd7c5132ccd0d883703c2.tar.xz
org.eclipse.cdt-b006bc98c3abca8ba53bd7c5132ccd0d883703c2.zip
Bug 262826 - Create common C/C++ launch configurations
-rw-r--r--debug/org.eclipse.cdt.debug.core/plugin.properties4
-rw-r--r--debug/org.eclipse.cdt.debug.core/plugin.xml19
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java50
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java18
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.properties6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.xml113
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java (renamed from launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java)21
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java (renamed from launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CPropertyTester.java)2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java41
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties34
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java24
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gifbin1042 -> 0 bytes
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml138
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AttachCDebuggerTab.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainAttachTab.java23
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java14
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LocalApplicationCDebuggerTab.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/RemoteApplicationCDebuggerTab.java25
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml40
-rw-r--r--launch/org.eclipse.cdt.launch/plugin.properties20
-rw-r--r--launch/org.eclipse.cdt.launch/plugin.xml258
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java52
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java3
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties17
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java7
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/ApplicationCDebuggerTab.java22
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/AttachCDebuggerTab.java22
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java17
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java14
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainAttachTab.java3
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java15
37 files changed, 878 insertions, 242 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/plugin.properties b/debug/org.eclipse.cdt.debug.core/plugin.properties
index fe21739c3d8..3e41201a551 100644
--- a/debug/org.eclipse.cdt.debug.core/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.core/plugin.properties
@@ -14,6 +14,10 @@
pluginName=C/C++ Development Tools Debug Model
providerName=Eclipse.org
+ApplicationLaunch.name=C/C++ Application
+AttachLaunch.name=C/C++ Attach to Application
+PostMortemLaunch.name=C/C++ Postmortem Debugger
+
CDebugger.name=C/C++ Development Tools Core Debugger Extension
BreakpointAction.name=Breakpoint Action Extension
diff --git a/debug/org.eclipse.cdt.debug.core/plugin.xml b/debug/org.eclipse.cdt.debug.core/plugin.xml
index 932cbbf803b..158c37b6dd5 100644
--- a/debug/org.eclipse.cdt.debug.core/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.core/plugin.xml
@@ -6,6 +6,25 @@
<extension-point id="BreakpointActionType" name="%BreakpointAction" schema="schema/BreakpointAction.exsd"/>
<extension-point id="BreakpointExtension" name="%BreakpointAction" schema="schema/BreakpointExtension.exsd"/>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ id="org.eclipse.cdt.launch.applicationLaunchType"
+ name="%ApplicationLaunch.name"
+ public="true">
+ </launchConfigurationType>
+ <launchConfigurationType
+ id="org.eclipse.cdt.launch.attachLaunchType"
+ name="%AttachLaunch.name"
+ public="true">
+ </launchConfigurationType>
+ <launchConfigurationType
+ id="org.eclipse.cdt.launch.postmortemLaunchType"
+ name="%PostMortemLaunch.name"
+ public="true">
+ </launchConfigurationType>
+ </extension>
+
<extension
id="cBreakpointMarker"
point="org.eclipse.core.resources.markers">
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
index 974f3293a61..4b088a477a5 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java
@@ -28,6 +28,8 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.cdi.CDIException;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
@@ -40,11 +42,13 @@ import org.eclipse.cdt.debug.core.model.ICWatchpoint2;
import org.eclipse.cdt.debug.internal.core.model.CFloatingPointValue;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IBreakpoint;
import org.w3c.dom.Document;
@@ -511,4 +515,50 @@ public class CDebugUtils {
return fDecoder;
}
+ /**
+ * Note: Moved from AbstractCLaunchDelegate
+ * @since 6.0
+ */
+ public static ICProject getCProject(ILaunchConfiguration configuration) throws CoreException {
+ String projectName = getProjectName(configuration);
+ if (projectName != null) {
+ projectName = projectName.trim();
+ if (projectName.length() > 0) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
+ if (cProject != null && cProject.exists()) {
+ return cProject;
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Note: Moved from AbstractCLaunchDelegate
+ * @since 6.0
+ */
+ public static String getProjectName(ILaunchConfiguration configuration) throws CoreException {
+ return configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ }
+
+ /**
+ * Note: Moved from AbstractCLaunchDelegate
+ * @since 6.0
+ */
+ public static String getProgramName(ILaunchConfiguration configuration) throws CoreException {
+ return configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
+ }
+
+ /**
+ * Note: Moved from AbstractCLaunchDelegate
+ * @since 6.0
+ */
+ public static IPath getProgramPath(ILaunchConfiguration configuration) throws CoreException {
+ String path = getProgramName(configuration);
+ if (path == null || path.trim().length() == 0) {
+ return null;
+ }
+ return new Path(path);
+ }
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java
index c7b5de6b93b..f8dcf413863 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java
@@ -17,11 +17,25 @@ public interface ICDTLaunchConfigurationConstants {
public static final String CDT_LAUNCH_ID = "org.eclipse.cdt.launch"; //$NON-NLS-1$
/**
- * This is the launch type id.
+ * This is the application launch type id.
*/
- public static final String ID_LAUNCH_C_APP = "org.eclipse.cdt.launch.localCLaunch"; //$NON-NLS-1$
+ public static final String ID_LAUNCH_C_APP = "org.eclipse.cdt.launch.applicationLaunchType"; //$NON-NLS-1$
/**
+ * This is the attach launch type id.
+ *
+ * @since 6.0
+ */
+ public static final String ID_LAUNCH_C_ATTACH = "org.eclipse.cdt.launch.attachLaunchType"; //$NON-NLS-1$
+
+ /**
+ * This is the post-mortem launch type id.
+ *
+ * @since 6.0
+ */
+ public static final String ID_LAUNCH_C_POST_MORTEM = "org.eclipse.cdt.launch.postmortemLaunchType"; //$NON-NLS-1$
+
+ /**
* Identifier for the C/C++ program process type, which is annotated on processes created
* by the C/C++ application launch delegate.
*
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties
index 3ab258552cf..b8c407ca6b4 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.properties
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties
@@ -189,3 +189,9 @@ breapointType.regular.label=Regular
breapointType.hardware.label=Hardware
breapointType.temporay.label=Temporary
breapointType.hardwaretemporaty.label=Hardware Temporary
+
+CApplicationShortcut.label=Local C/C++ Application
+ContextualRunCApplication.description=Runs a local C/C++ application
+ContextualDebugCApplication.description=Debugs a local C/C++ application
+
+
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 052cac7cf15..f7e3a7eb235 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -8,6 +8,119 @@
<!-- Extensions -->
<extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ icon="icons/obj16/c_app.gif"
+ configTypeID="org.eclipse.cdt.launch.applicationLaunchType"
+ id="org.eclipse.cdt.launch.localRunLaunchImage">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ icon="icons/obj16/c_app.gif"
+ configTypeID="org.eclipse.cdt.launch.attachLaunchType"
+ id="org.eclipse.cdt.launch.localAttachLaunchImage">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ icon="icons/obj16/c_app.gif"
+ configTypeID="org.eclipse.cdt.launch.postmortemLaunchType"
+ id="org.eclipse.cdt.launch.coreFileLaunchImage">
+ </launchConfigurationTypeImage>
+ </extension>
+
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ type="org.eclipse.cdt.launch.applicationLaunchType"
+ class="org.eclipse.cdt.debug.internal.ui.launch.PlaceHolderLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.launch.applicationLaunchTabGroup">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ type="org.eclipse.cdt.launch.attachLaunchType"
+ class="org.eclipse.cdt.debug.internal.ui.launch.PlaceHolderLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.launch.attachLaunchTabGroup">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ type="org.eclipse.cdt.launch.postmortemLaunchType"
+ class="org.eclipse.cdt.debug.internal.ui.launch.PlaceHolderLaunchConfigurationTabGroup"
+ id="org.eclipse.cdt.launch.postmortemLaunchTabGroup">
+ </launchConfigurationTabGroup>
+ </extension>
+
+ <extension
+ point="org.eclipse.debug.ui.launchShortcuts">
+ <shortcut
+ label="%CApplicationShortcut.label"
+ icon="icons/obj16/c_app.gif"
+ modes="run, debug"
+ class="org.eclipse.cdt.debug.internal.ui.launch.CApplicationLaunchShortcut"
+ id="org.eclipse.cdt.debug.ui.localCShortcut">
+ <contextualLaunch>
+ <enablement>
+ <with variable="selection">
+ <count value="1"/>
+ <iterate>
+ <or>
+ <instanceof value="org.eclipse.cdt.core.model.IBinary"/>
+ <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.cdt.launch.isExecutable"/>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.cdt.launch.isCProject"/>
+ <and>
+ <instanceof value="org.eclipse.ui.IFileEditorInput"/>
+ <adapt type="org.eclipse.core.resources.IResource">
+ <adapt type="org.eclipse.cdt.core.model.ICElement"/>
+ </adapt>
+ </and>
+ </or>
+ </iterate>
+ </with>
+ </enablement>
+ </contextualLaunch>
+ <description
+ mode="run"
+ description="%ContextualRunCApplication.description"/>
+ <description
+ mode="debug"
+ description="%ContextualDebugCApplication.description"/>
+ <configurationType
+ id="org.eclipse.cdt.launch.applicationLaunchType">
+ </configurationType>
+ </shortcut>
+ </extension>
+<!-- Property testers -->
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ namespace="org.eclipse.cdt.launch"
+ properties="isExecutable,isCProject"
+ type="org.eclipse.core.runtime.IAdaptable"
+ class="org.eclipse.cdt.debug.internal.ui.launch.CPropertyTester"
+ id="org.eclipse.cdt.launch.CPropertyTester">
+ </propertyTester>
+ </extension>
+
+ <!-- Adapters for contextual launch -->
+ <extension point="org.eclipse.core.runtime.adapters">
+ <factory
+ class=""
+ adaptableType="org.eclipse.cdt.core.model.IBinary">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class=""
+ adaptableType="org.eclipse.core.resources.IResource">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ <factory
+ class=""
+ adaptableType="org.eclipse.cdt.core.model.ICProject">
+ <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
+ </factory>
+ </extension>
+
+
+ <extension
point="org.eclipse.debug.ui.debugModelPresentations">
<debugModelPresentation
class="org.eclipse.cdt.debug.internal.ui.CDebugModelPresentation"
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
index 41ff47547d8..58d45023f85 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
@@ -9,7 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Ken Ryall (Nokia) - bug 178731
*******************************************************************************/
-package org.eclipse.cdt.launch.internal;
+package org.eclipse.cdt.debug.internal.ui.launch;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -24,13 +24,11 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.ICDebuggerPage;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
-import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
-import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -58,6 +56,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.dialogs.TwoPaneElementSelector;
@@ -94,8 +93,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
candidateConfigs = new ArrayList(configs.length);
for (int i = 0; i < configs.length; i++) {
ILaunchConfiguration config = configs[i];
- IPath programPath = AbstractCLaunchDelegate.getProgramPath(config);
- String projectName = AbstractCLaunchDelegate.getProjectName(config);
+ IPath programPath = CDebugUtils.getProgramPath(config);
+ String projectName = CDebugUtils.getProjectName(config);
IPath name = bin.getResource().getProjectRelativePath();
if (programPath != null && programPath.equals(name)) {
if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) {
@@ -104,7 +103,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
}
}
} catch (CoreException e) {
- LaunchUIPlugin.log(e);
+ CDebugUIPlugin.log(e);
}
// If there are no existing configs associated with the IBinary, create one.
@@ -207,7 +206,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
config = wc.doSave();
} catch (CoreException ce) {
- LaunchUIPlugin.log(ce);
+ CDebugUIPlugin.log(ce);
}
return config;
}
@@ -228,7 +227,11 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
* Convenience method to get the window that owns this action's Shell.
*/
protected Shell getShell() {
- return LaunchUIPlugin.getActiveWorkbenchShell();
+ IWorkbenchWindow w = CDebugUIPlugin.getDefault().getActiveWorkbenchWindow();
+ if (w != null) {
+ return w.getShell();
+ }
+ return null;
}
/**
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CPropertyTester.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
index e048fc2e561..bbf96d1fbd7 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CPropertyTester.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
@@ -9,7 +9,7 @@
* IBM Corporation - initial implementation
* Ken Ryall (Nokia) - Modified to launch on a project context.
*******************************************************************************/
-package org.eclipse.cdt.launch.internal;
+package org.eclipse.cdt.debug.internal.ui.launch;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.IBinary;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java
new file mode 100644
index 00000000000..24efbe4ced4
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2006 QNX Software Systems 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
+ *
+ * Contributors:
+ * QNX Software Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.launch;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class LaunchMessages {
+
+ private static final String BUNDLE_NAME = "org.eclipse.cdt.launch.internal.ui.LaunchMessages";//$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private LaunchMessages() {
+ }
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), new String[]{arg});
+ }
+
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), args);
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties
new file mode 100644
index 00000000000..2342560ff06
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/LaunchMessages.properties
@@ -0,0 +1,34 @@
+###############################################################################
+# Copyright (c) 2002, 2008 QNX Software Systems 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
+#
+# Contributors:
+# QNX Software Systems - Initial API and implementation
+# Monta Vista - Joanne Woo - Bug 87556
+# Nokia - Ken Ryall - Bug 118894
+# Carlos O'Donnel (CodeSourcery) - Bug 218366
+# IBM Corporation
+###############################################################################
+
+CApplicationLaunchShortcut.Application_Launcher=Application Launcher
+CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug
+CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run
+CApplicationLaunchShortcut.CLocalApplication=C Local Application
+CApplicationLaunchShortcut.ChooseLocalAppToDebug=Choose a local application to debug
+CApplicationLaunchShortcut.ChooseLocalAppToRun=Choose a local application to run
+CApplicationLaunchShortcut.Launch_failed_no_binaries=Launch failed. Binary not found.
+CApplicationLaunchShortcut.LaunchFailed=Launch failed
+CApplicationLaunchShortcut.LaunchDebugConfigSelection=Launch Debug Configuration Selection
+CApplicationLaunchShortcut.LaunchConfigSelection=Launch Configuration Selection
+CApplicationLaunchShortcut.Invalid_launch_mode_1=Invalid launch mode
+CApplicationLaunchShortcut.Invalid_launch_mode_2=Invalid launch mode.
+CApplicationLaunchShortcut.Invalid_launch_mode_3=Invalid launch mode.
+CApplicationLaunchShortcut.ChooseLaunchConfigToDebug=Choose a launch configuration to debug
+CApplicationLaunchShortcut.ChooseLaunchConfigToRun=Choose a launch configuration to run
+CApplicationLaunchShortcut.Launch_failed_no_project_selected=Launch failed no project selected
+
+Launch.common.BinariesColon=Binaries:
+Launch.common.QualifierColon=Qualifier:
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java
new file mode 100644
index 00000000000..b754f8d055f
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/PlaceHolderLaunchConfigurationTabGroup.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.debug.internal.ui.launch;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+
+/**
+ * @since 6.0
+ */
+public class PlaceHolderLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ setTabs(new ILaunchConfigurationTab[0]);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif
deleted file mode 100644
index 805a1d0ab8b..00000000000
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/obj16/c_app.gif
+++ /dev/null
Binary files differ
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties
index e9377520097..8af805e35cf 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties
@@ -35,3 +35,9 @@ command.reverseStepOver.label = Reverse StepOver
command.uncall.name = Uncall
command.uncall.description = Perform Uncall
command.uncall.label = Uncall
+
+launchTab.main.name=Main
+launchTab.arguments.name=Arguments
+launchTab.debugger.name=Debugger
+launchTab.sourceLookup.name=Source
+launchTab.common.name=Common
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
index 37638ae478e..c308713bdac 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
@@ -2,44 +2,124 @@
<?eclipse version="3.0"?>
<plugin>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabs">
+ <!-- Local application launch tabs-->
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.localApplicationLaunch.mainTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.main.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"/>
+ </tab>
+ <tab id="org.eclipse.cdt.dsf.gdb.launch.localApplicationLaunch.argumentsTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.arguments.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CArgumentsTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.localApplicationLaunch.debuggerTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.debugger.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.argumentsTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.localApplicationLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.sourceLookup.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.debuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.localApplicationLaunch.commonTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.common.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+
+ <!-- Remote application launch tabs-->
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteApplicationLaunch.mainTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.main.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteApplicationLaunch.debuggerTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.debugger.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.LocalApplicationCDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteApplicationLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.sourceLookup.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.debuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.remoteApplicationLaunch.commonTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%launchTab.common.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+
+ <!-- Attach launch tabs-->
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.attachLaunch.mainTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%launchTab.main.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainAttachTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.attachLaunch.debuggerTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%launchTab.debugger.name"
+ class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.AttachCDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.attachLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%launchTab.sourceLookup.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"/>
+ <placement after="org.eclipse.cdt.dsf.gdb.launch.debuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.dsf.gdb.launch.attachLaunch.commonTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%launchTab.common.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+ </extension>
+
<extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups">
<launchConfigurationTabGroup
- class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbLocalRunLaunchConfigurationTabGroup"
- id="org.eclipse.cdt.dsf.gdb.launch.localRunLaunchTabGroup"
- type="org.eclipse.cdt.dsf.gdb.launch.localCLaunch">
- </launchConfigurationTabGroup>
- <launchConfigurationTabGroup
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup"
id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchTabGroup"
type="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch">
</launchConfigurationTabGroup>
- <launchConfigurationTabGroup
- class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbAttachLaunchConfigurationTabGroup"
- id="org.eclipse.cdt.dsf.gdb.launch.localAttachLaunchTabGroup"
- type="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch">
- </launchConfigurationTabGroup>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"
- icon="icons/full/obj16/c_app.gif"
- id="org.eclipse.cdt.dsf.gdb.launch.localRunLaunchImage">
- </launchConfigurationTypeImage>
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"
- icon="icons/full/obj16/c_app.gif"
- id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchImage">
- </launchConfigurationTypeImage>
- <launchConfigurationTypeImage
- configTypeID="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"
- icon="icons/full/obj16/c_app.gif"
- id="org.eclipse.cdt.dsf.gdb.launch.attachRunLaunchImage">
- </launchConfigurationTypeImage>
</extension>
-
<extension point="org.eclipse.core.runtime.adapters">
<factory
class="org.eclipse.cdt.dsf.gdb.internal.ui.GdbAdapterFactory"
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AttachCDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AttachCDebuggerTab.java
new file mode 100644
index 00000000000..42ad72c35f1
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/AttachCDebuggerTab.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+
+/**
+ * Debugger tab to use for an attach launch configuration.
+ *
+ * @since 2.0
+ */
+public class AttachCDebuggerTab extends CDebuggerTab {
+
+ public AttachCDebuggerTab() {
+ // We don't know yet if we are going to do a remote or local session
+ super(null, true);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java
index 24c95429e77..afdb1d62dc7 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CArgumentsTab.java
@@ -48,6 +48,15 @@ import org.eclipse.swt.widgets.Text;
*/
public class CArgumentsTab extends CLaunchConfigurationTab {
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 2.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.dsf.gdb.launch.argumentsTab";
+
// Program arguments UI widgets
protected Label fPrgmArgumentsLabel;
protected Text fPrgmArgumentsText;
@@ -222,6 +231,11 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
return null;
}
+ @Override
+ public String getId() {
+ return TAB_ID;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
index 7660e19b6d7..990f091a2d8 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CDebuggerTab.java
@@ -61,6 +61,15 @@ import org.eclipse.swt.widgets.Text;
public class CDebuggerTab extends AbstractCDebuggerTab {
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 2.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.dsf.gdb.launch.debuggerTab";
+
private final static String LOCAL_DEBUGGER_ID = "org.eclipse.cdt.dsf.gdb.GdbDebugger";//$NON-NLS-1$
private final static String REMOTE_DEBUGGER_ID = "org.eclipse.cdt.dsf.gdb.GdbServerDebugger";//$NON-NLS-1$
@@ -86,6 +95,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
}
@Override
+ public String getId() {
+ return TAB_ID;
+ }
+
+ @Override
public void createControl(Composite parent) {
fContainer = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
fContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainAttachTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainAttachTab.java
new file mode 100644
index 00000000000..8bb19250a28
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainAttachTab.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+
+/**
+ * Main tab to use for an attach launch configuration.
+ *
+ * @since 2.0
+ */
+public class CMainAttachTab extends CMainTab {
+ public CMainAttachTab() {
+ super(2);// In some case, we don't need to specify an executable
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java
index 8178ab08caa..36bab989daa 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/CMainTab.java
@@ -71,6 +71,15 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
public class CMainTab extends CLaunchConfigurationTab {
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 2.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.dsf.gdb.launch.mainTab";
+
// Project UI widgets
protected Label fProjLabel;
protected Text fProjText;
@@ -697,6 +706,11 @@ public class CMainTab extends CLaunchConfigurationTab {
}
}
+ @Override
+ public String getId() {
+ return TAB_ID;
+ }
+
/*
* (non-Javadoc)
*
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LocalApplicationCDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LocalApplicationCDebuggerTab.java
new file mode 100644
index 00000000000..9e779f3747a
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/LocalApplicationCDebuggerTab.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+
+/**
+ * Debugger tab to use for a local application launch configuration.
+ *
+ * @since 2.0
+ */
+public class LocalApplicationCDebuggerTab extends CDebuggerTab {
+
+ public LocalApplicationCDebuggerTab() {
+ super(SessionType.LOCAL, false);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/RemoteApplicationCDebuggerTab.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/RemoteApplicationCDebuggerTab.java
new file mode 100644
index 00000000000..570498c1208
--- /dev/null
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/launching/RemoteApplicationCDebuggerTab.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
+
+import org.eclipse.cdt.dsf.gdb.service.SessionType;
+
+/**
+ * Debugger tab to use for a remote application launch configuration.
+ *
+ * @since 2.0
+ */
+public class RemoteApplicationCDebuggerTab extends CDebuggerTab {
+
+ public RemoteApplicationCDebuggerTab() {
+ super(SessionType.REMOTE, false);
+ }
+}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties
index c3f20315fe2..08342fdd495 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.properties
@@ -11,3 +11,9 @@
pluginName=GDB DSF Debugger Integration Core
providerName=Eclipse.org
+launchDelegate.localApplication.name=GDB (DSF) Create Process
+launchDelegate.localApplication.description=Start new application under control of GDB debugger integrated using the Debugger Services Framework (DSF).
+launchDelegate.remoteApplication.name=GDB (DSF) Remote System Process
+launchDelegate.remoteApplication.description=Start new application on a remote system under control of GDB debugger integrated using the Debugger Services Framework (DSF)
+launchDelegate.attach.name=GDB (DSF) Attach to Process
+launchDelegate.attach.description=Attach the GDB debugger, integrated using the Debugger Services Framework (DSF), to a running program.
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml
index c49c90e1fb3..5d6300f5df3 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/plugin.xml
@@ -2,34 +2,38 @@
<?eclipse version="3.0"?>
<plugin>
- <extension point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
- delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
- public="true"
- sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
- name="C/C++ Local Application (Experimental - DSF)"
+ <!-- TODO: externalize the strings. For some reason strings from plugin.properties are not working -->
+ <extension point="org.eclipse.debug.core.launchDelegates">
+ <launchDelegate
id="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"
- modes="debug">
- </launchConfigurationType>
- <launchConfigurationType
+ type="org.eclipse.cdt.launch.applicationLaunchType"
+ modes="debug"
delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ name="GDB (DSF) Create Process"
+ delegateDescription="Start new application under control of GDB debugger integrated using the Debugger Services Framework (DSF)."
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+ </launchDelegate>
+ <launchDelegate
id="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"
+ type="org.eclipse.cdt.launch.applicationLaunchType"
modes="debug"
- name="C/C++ Remote Application (Experimental - DSF)"
- public="true"
+ delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ name="GDB (DSF) Remote System Process"
+ delegateDescription="Start new application on a remote system under control of GDB debugger integrated using the Debugger Services Framework (DSF)"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
- </launchConfigurationType>
- <launchConfigurationType
- delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ </launchDelegate>
+ <launchDelegate
id="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"
+ type="org.eclipse.cdt.launch.attachLaunchType"
modes="debug"
- name="C/C++ Attach to Running Application (Experimental - DSF)"
- public="true"
+ delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
+ name="GDB (DSF) Attach to Process"
+ delegateDescription="Attach the GDB debugger, integrated using the Debugger Services Framework (DSF), to a running program."
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
- </launchConfigurationType>
+ </launchDelegate>
</extension>
<extension
diff --git a/launch/org.eclipse.cdt.launch/plugin.properties b/launch/org.eclipse.cdt.launch/plugin.properties
index c81dd4f5d80..109d6740c12 100644
--- a/launch/org.eclipse.cdt.launch/plugin.properties
+++ b/launch/org.eclipse.cdt.launch/plugin.properties
@@ -11,11 +11,17 @@
pluginName=C/C++ Development Tools Launching Support
providerName=Eclipse.org
-LocalCDTLaunch.name=C/C++ Local Application
-LocalAttachCDTLaunch.name=C/C++ Attach to Local Application
-CoreFileCDTLaunch.name=C/C++ Postmortem debugger
-
-CApplicationShortcut.label=Local C/C++ Application
-ContextualRunCApplication.description=Runs a local C/C++ application
-ContextualDebugCApplication.description=Debugs a local C/C++ application
+LocalCDTLaunch.name=Standard Create Process
+LocalCDTLaunch.description=Start new application optionally under control of the standard debugger.
+LocalAttachCDTLaunch.name=Standard Attach to Process
+LocalAttachCDTLaunch.description=Attach standard debugger to a running program using.
+CoreFileCDTLaunch.name=Standard Postmortem Debugger
+CoreFileCDTLaunch.description=Load an application dump into the standard debugger.
+MainLaunchTab.name=Main
+ArgumentsLaunchTab.name=Arguments
+EnvironmentLaunchTab.name=Environment
+DebuggerLaunchTab.name=Debugger
+SourceLookupLaunchTab.name=Source
+CommonLaunchTab.name=Common
+CoreFileLaunchTab.name=Debugger \ No newline at end of file
diff --git a/launch/org.eclipse.cdt.launch/plugin.xml b/launch/org.eclipse.cdt.launch/plugin.xml
index 283833b730d..717eeb61205 100644
--- a/launch/org.eclipse.cdt.launch/plugin.xml
+++ b/launch/org.eclipse.cdt.launch/plugin.xml
@@ -3,124 +3,155 @@
<plugin>
<extension
- point="org.eclipse.debug.core.launchConfigurationTypes">
- <launchConfigurationType
- sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ point="org.eclipse.debug.core.launchDelegates">
+ <launchDelegate
+ id="org.eclipse.cdt.cdi.launch.localCLaunch"
+ type="org.eclipse.cdt.launch.applicationLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
- public="true"
- sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
+ modes="run,debug"
name="%LocalCDTLaunch.name"
- id="org.eclipse.cdt.launch.localCLaunch"
- modes="run,debug">
- </launchConfigurationType>
- <launchConfigurationType
+ delegateDescription="%LocalCDTLaunch.description"
+ sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
+ sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
+ </launchDelegate>
+ <launchDelegate
+ id="org.eclipse.cdt.cdi.launch.localCAttachLaunch"
+ type="org.eclipse.cdt.launch.attachLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
- id="org.eclipse.cdt.launch.localAttachCLaunch"
modes="debug"
name="%LocalAttachCDTLaunch.name"
- public="true"
+ delegateDescription="%LocalAttachCDTLaunch.description"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
- </launchConfigurationType>
- <launchConfigurationType
+ </launchDelegate>
+ <launchDelegate
+ id="org.eclipse.cdt.cdi.launch.coreFileCLaunch"
+ type="org.eclipse.cdt.launch.postmortemLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
- id="org.eclipse.cdt.launch.coreFileCLaunch"
modes="debug"
name="%CoreFileCDTLaunch.name"
- public="true"
+ delegateDescription="%CoreFileCDTLaunch.description"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
- </launchConfigurationType>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchConfigurationTypeImages">
- <launchConfigurationTypeImage
- icon="icons/obj16/c_app.gif"
- configTypeID="org.eclipse.cdt.launch.localCLaunch"
- id="org.eclipse.cdt.launch.localRunLaunchImage">
- </launchConfigurationTypeImage>
- <launchConfigurationTypeImage
- icon="icons/obj16/c_app.gif"
- configTypeID="org.eclipse.cdt.launch.localAttachCLaunch"
- id="org.eclipse.cdt.launch.localAttachLaunchImage">
- </launchConfigurationTypeImage>
- <launchConfigurationTypeImage
- icon="icons/obj16/c_app.gif"
- configTypeID="org.eclipse.cdt.launch.coreFileCLaunch"
- id="org.eclipse.cdt.launch.coreFileLaunchImage">
- </launchConfigurationTypeImage>
+ </launchDelegate>
</extension>
+
<extension
- point="org.eclipse.debug.ui.launchConfigurationTabGroups">
- <launchConfigurationTabGroup
- type="org.eclipse.cdt.launch.localCLaunch"
- class="org.eclipse.cdt.launch.internal.ui.LocalRunLaunchConfigurationTabGroup"
- id="org.eclipse.cdt.launch.localRunLaunchTabGroup">
- </launchConfigurationTabGroup>
- <launchConfigurationTabGroup
- type="org.eclipse.cdt.launch.localAttachCLaunch"
- class="org.eclipse.cdt.launch.internal.ui.LocalAttachLaunchConfigurationTabGroup"
- id="org.eclipse.cdt.launch.localAttachLaunchTabGroup">
- </launchConfigurationTabGroup>
- <launchConfigurationTabGroup
- type="org.eclipse.cdt.launch.coreFileCLaunch"
- class="org.eclipse.cdt.launch.internal.ui.CoreFileLaunchConfigurationTabGroup"
- id="org.eclipse.cdt.launch.coreFileCLaunchTabGroup">
- </launchConfigurationTabGroup>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- label="%CApplicationShortcut.label"
- icon="icons/obj16/c_app.gif"
- modes="run, debug"
- class="org.eclipse.cdt.launch.internal.CApplicationLaunchShortcut"
- id="org.eclipse.cdt.debug.ui.localCShortcut">
- <contextualLaunch>
- <enablement>
- <with variable="selection">
- <count value="1"/>
- <iterate>
- <or>
- <instanceof value="org.eclipse.cdt.core.model.IBinary"/>
- <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
- <test
- forcePluginActivation="true"
- property="org.eclipse.cdt.launch.isExecutable"/>
- <test
- forcePluginActivation="true"
- property="org.eclipse.cdt.launch.isCProject"/>
- <and>
- <instanceof value="org.eclipse.ui.IFileEditorInput"/>
- <adapt type="org.eclipse.core.resources.IResource">
- <adapt type="org.eclipse.cdt.core.model.ICElement"/>
- </adapt>
- </and>
- </or>
- </iterate>
- </with>
- </enablement>
- </contextualLaunch>
- <description
- mode="run"
- description="%ContextualRunCApplication.description"/>
- <description
- mode="debug"
- description="%ContextualDebugCApplication.description"/>
- <configurationType
- id="org.eclipse.cdt.launch.localCLaunch">
- </configurationType>
- </shortcut>
- </extension>
-<!-- Property testers -->
- <extension point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- namespace="org.eclipse.cdt.launch"
- properties="isExecutable,isCProject"
- type="org.eclipse.core.runtime.IAdaptable"
- class="org.eclipse.cdt.launch.internal.CPropertyTester"
- id="org.eclipse.cdt.launch.CPropertyTester">
- </propertyTester>
+ point="org.eclipse.debug.ui.launchConfigurationTabs">
+ <!-- Application launch tabs-->
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.mainTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%MainLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.CMainTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.argumentsTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%ArgumentsLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.CArgumentsTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.environmentTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%EnvironmentLaunchTab.name"
+ class="org.eclipse.debug.ui.EnvironmentTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.argumentsTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.debuggerTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%DebuggerLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.ApplicationCDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <placement after="org.eclipse.debug.ui.environmentTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%SourceLookupLaunchTab.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.debuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.applicationLaunch.commonTab"
+ group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
+ name="%CommonLaunchTab.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+
+ <!-- Attach launch tabs-->
+ <tab
+ id="org.eclipse.cdt.cdi.launch.attachLaunch.mainAttachTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%MainLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.CMainAttachTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.attachLaunch.debuggerTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%DebuggerLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.AttachCDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.attachLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%SourceLookupLaunchTab.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.debuggerTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.attachLaunch.commonTab"
+ group="org.eclipse.cdt.launch.attachLaunchTabGroup"
+ name="%CommonLaunchTab.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
+
+ <!-- Post mortem launch tabs-->
+ <tab
+ id="org.eclipse.cdt.cdi.launch.postmortemLaunch.mainTab"
+ group="org.eclipse.cdt.launch.postmortemLaunchTabGroup"
+ name="%MainLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.CMainTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.coreFileCLaunch"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.postmortemLaunch.coreTab"
+ group="org.eclipse.cdt.launch.postmortemLaunchTabGroup"
+ name="%CoreFileLaunchTab.name"
+ class="org.eclipse.cdt.launch.ui.CoreFileDebuggerTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.coreFileCLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.postmortemLaunch.sourceLookupTab"
+ group="org.eclipse.cdt.launch.postmortemLaunchTabGroup"
+ name="%SourceLookupLaunchTab.name"
+ class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.coreFileCLaunch"/>
+ <placement after="org.eclipse.cdt.cdi.launch.coreTab"/>
+ </tab>
+ <tab
+ id="org.eclipse.cdt.cdi.launch.postmortemLaunch.commonTab"
+ group="org.eclipse.cdt.launch.postmortemLaunchTabGroup"
+ name="%CommonLaunchTab.name"
+ class="org.eclipse.debug.ui.CommonTab">
+ <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.coreFileCLaunch"/>
+ <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
+ </tab>
</extension>
<extension
point="org.eclipse.debug.core.statusHandlers">
@@ -138,23 +169,4 @@
</statusHandler>
</extension>
- <!-- Adapters for contextual launch -->
- <extension point="org.eclipse.core.runtime.adapters">
- <factory
- class=""
- adaptableType="org.eclipse.cdt.core.model.IBinary">
- <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- class=""
- adaptableType="org.eclipse.core.resources.IResource">
- <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- <factory
- class=""
- adaptableType="org.eclipse.cdt.core.model.ICProject">
- <adapter type="org.eclipse.debug.ui.actions.ILaunchable"/>
- </factory>
- </extension>
-
</plugin>
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 43e7508c9cf..0aaf238ae62 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -38,6 +38,7 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
@@ -173,35 +174,32 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
abstract protected String getPluginID();
+ /**
+ * @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
+ */
public static ICProject getCProject(ILaunchConfiguration configuration) throws CoreException {
- String projectName = getProjectName(configuration);
- if (projectName != null) {
- projectName = projectName.trim();
- if (projectName.length() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- ICProject cProject = CCorePlugin.getDefault().getCoreModel().create(project);
- if (cProject != null && cProject.exists()) {
- return cProject;
- }
- }
- }
- return null;
+ return CDebugUtils.getCProject(configuration);
}
+ /**
+ * @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
+ */
public static String getProjectName(ILaunchConfiguration configuration) throws CoreException {
- return configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null);
+ return CDebugUtils.getProjectName(configuration);
}
+ /**
+ * @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
+ */
public static String getProgramName(ILaunchConfiguration configuration) throws CoreException {
- return configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, (String)null);
+ return CDebugUtils.getProgramName(configuration);
}
+ /**
+ * @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
+ */
public static IPath getProgramPath(ILaunchConfiguration configuration) throws CoreException {
- String path = getProgramName(configuration);
- if (path == null || path.trim().length() == 0) {
- return null;
- }
- return new Path(path);
+ return CDebugUtils.getProgramPath(configuration);
}
/**
@@ -233,7 +231,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
IPersistableSourceLocator sourceLocator;
String id = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
if (id == null) {
- ICProject cProject = getCProject(configuration);
+ ICProject cProject = CDebugUtils.getCProject(configuration);
if (cProject == null) {
abort(LaunchMessages.getString("Launch.common.Project_does_not_exist"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
@@ -330,7 +328,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
@Deprecated
protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException {
ICProject cproject = verifyCProject(config);
- String fileName = getProgramName(config);
+ String fileName = CDebugUtils.getProgramName(config);
if (fileName == null) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
@@ -349,12 +347,12 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
}
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
- String name = getProjectName(config);
+ String name = CDebugUtils.getProjectName(config);
if (name == null) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.C_Project_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
}
- ICProject cproject = getCProject(config);
+ ICProject cproject = CDebugUtils.getCProject(config);
if (cproject == null) {
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!proj.exists()) {
@@ -373,7 +371,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
protected IPath verifyProgramPath(ILaunchConfiguration config) throws CoreException {
ICProject cproject = verifyCProject(config);
- IPath programPath = getProgramPath(config);
+ IPath programPath = CDebugUtils.getProgramPath(config);
if (programPath == null || programPath.isEmpty()) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
@@ -386,7 +384,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
// Try the old way, which is required to support linked resources.
IFile projFile = null;
try {
- projFile = project.getFile(getProgramPath(config));
+ projFile = project.getFile(CDebugUtils.getProgramPath(config));
}
catch (IllegalArgumentException exc) {} // thrown if relative path that resolves to a root file (e.g., "..\somefile")
if (projFile != null && projFile.exists()) {
@@ -426,7 +424,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
IPath path = getWorkingDirectoryPath(configuration);
if (path == null) {
// default working dir is the project if this config has a project
- ICProject cp = getCProject(configuration);
+ ICProject cp = CDebugUtils.getCProject(configuration);
if (cp != null) {
IProject p = cp.getProject();
return p.getLocation().toFile();
@@ -723,7 +721,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
// build project list
orderedProjects = null;
- ICProject cProject = getCProject(configuration);
+ ICProject cProject = CDebugUtils.getCProject(configuration);
if (cProject != null) {
project = cProject.getProject();
HashSet projectSet = new HashSet();
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
index 8665ba8a951..6ea910f8d43 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CoreFileLaunchDelegate.java
@@ -16,6 +16,7 @@ import java.io.File;
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.CDIDebugModel;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.core.cdi.CDIException;
@@ -58,7 +59,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
ICDebugConfiguration debugConfig = getDebugConfig(config);
ICDISession dsession = null;
- ICProject cproject = getCProject(config);
+ ICProject cproject = CDebugUtils.getCProject(config);
String path = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null);
if (path == null) {
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java
index f520f41aa04..77d17eb9692 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalAttachLaunchDelegate.java
@@ -11,9 +11,11 @@
package org.eclipse.cdt.launch.internal;
import java.io.FileNotFoundException;
+
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.CDIDebugModel;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.core.cdi.CDIException;
@@ -61,7 +63,7 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
try {
monitor.worked(1);
ICProject cproject = verifyCProject(config);
- IPath exePath = getProgramPath(config);
+ IPath exePath = CDebugUtils.getProgramPath(config);
if (exePath != null && !exePath.isEmpty()) {
if (!exePath.isAbsolute()) {
IFile wsProgramPath = cproject.getProject().getFile(exePath);
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
index d552f4373a5..31f5e89b809 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
@@ -51,23 +51,6 @@ CoreFileLaunchDelegate.Corefile_not_accessible=Core file is not accessible.
CoreFileLaunchDelegate.Corefile_not_readable=Core file does not exist or is not readable.
CoreFileLaunchDelegate.postmortem_debugging_failed=Post-mortem debugging failed
-CApplicationLaunchShortcut.Application_Launcher=Application Launcher
-CApplicationLaunchShortcut.ChooseConfigToDebug=Choose a debug configuration to debug
-CApplicationLaunchShortcut.ChooseConfigToRun=Choose a configuration to run
-CApplicationLaunchShortcut.CLocalApplication=C Local Application
-CApplicationLaunchShortcut.ChooseLocalAppToDebug=Choose a local application to debug
-CApplicationLaunchShortcut.ChooseLocalAppToRun=Choose a local application to run
-CApplicationLaunchShortcut.Launch_failed_no_binaries=Launch failed. Binary not found.
-CApplicationLaunchShortcut.LaunchFailed=Launch failed
-CApplicationLaunchShortcut.LaunchDebugConfigSelection=Launch Debug Configuration Selection
-CApplicationLaunchShortcut.LaunchConfigSelection=Launch Configuration Selection
-CApplicationLaunchShortcut.Invalid_launch_mode_1=Invalid launch mode
-CApplicationLaunchShortcut.Invalid_launch_mode_2=Invalid launch mode.
-CApplicationLaunchShortcut.Invalid_launch_mode_3=Invalid launch mode.
-CApplicationLaunchShortcut.ChooseLaunchConfigToDebug=Choose a launch configuration to debug
-CApplicationLaunchShortcut.ChooseLaunchConfigToRun=Choose a launch configuration to run
-CApplicationLaunchShortcut.Launch_failed_no_project_selected=Launch failed no project selected
-
AbstractCDebuggerTab.No_debugger_available=No debugger available
AbstractCDebuggerTab.Debugger=Debugger
AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
index a439ce26822..2a18a84dd3a 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchUIPlugin.java
@@ -11,7 +11,9 @@
package org.eclipse.cdt.launch.internal.ui;
import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
+import org.eclipse.cdt.debug.core.CDebugUtils;
+import org.eclipse.cdt.debug.core.ICDebugConstants;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -185,6 +187,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements IDebugEventSetLi
*/
public void start(BundleContext context) throws Exception {
super.start(context);
+ LaunchUIPlugin.getDefault().getPluginPreferences().getString( ICDebugConstants.PREF_FILTERED_DEBUGGERS );
DebugPlugin.getDefault().addDebugEventListener(this);
}
@@ -216,7 +219,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements IDebugEventSetLi
try {
ILaunchConfiguration launchConfig = proc.getLaunch().getLaunchConfiguration();
if (launchConfig != null) {
- cproject = AbstractCLaunchDelegate.getCProject(launchConfig);
+ cproject = CDebugUtils.getCProject(launchConfig);
}
} catch (CoreException e) {
}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
index efa9542b6ed..f46b2f4c693 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
@@ -13,8 +13,8 @@ package org.eclipse.cdt.launch.internal.ui;
import java.io.File;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.debug.core.CDebugUtils;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
-import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource;
@@ -249,7 +249,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
try {
ILaunchConfiguration config = getLaunchConfiguration();
if (config != null) {
- ICProject cProject = AbstractCLaunchDelegate.getCProject(config);
+ ICProject cProject = CDebugUtils.getCProject(config);
if (cProject != null) {
fWorkingDirText.setText("${workspace_loc:" + cProject.getPath().makeRelative().toOSString() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
return;
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/ApplicationCDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/ApplicationCDebuggerTab.java
new file mode 100644
index 00000000000..e5567beb20d
--- /dev/null
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/ApplicationCDebuggerTab.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.launch.ui;
+
+/**
+ * CDebugger tab to use for an application launch configuration.
+ *
+ * @since 6.0
+ */
+public class ApplicationCDebuggerTab extends CDebuggerTab {
+ public ApplicationCDebuggerTab() {
+ super (false);
+ }
+}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/AttachCDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/AttachCDebuggerTab.java
new file mode 100644
index 00000000000..4454eb9b2ea
--- /dev/null
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/AttachCDebuggerTab.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Wind River Systems 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
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.launch.ui;
+
+/**
+ * CDebugger tab to use for an attach launch configuration.
+ *
+ * @since 6.0
+ */
+public class AttachCDebuggerTab extends CDebuggerTab {
+ public AttachCDebuggerTab() {
+ super (true);
+ }
+}
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
index bb5d58b1e88..a1ce58aea87 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
@@ -49,7 +49,16 @@ import org.eclipse.swt.widgets.Text;
*/
public class CArgumentsTab extends CLaunchConfigurationTab {
- // Program arguments UI widgets
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 6.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.argumentsTab";
+
+ // Program arguments UI widgets
protected Label fPrgmArgumentsLabel;
protected Text fPrgmArgumentsText;
protected Button fArgumentVariablesButton;
@@ -218,6 +227,12 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
return null;
}
+
+ @Override
+ public String getId() {
+ return TAB_ID;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
index 1b52ada19db..c447ddc1ffd 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
@@ -65,6 +65,15 @@ import org.eclipse.swt.widgets.Text;
public class CDebuggerTab extends AbstractCDebuggerTab {
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 6.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.debuggerTab";
+
public class AdvancedDebuggerOptionsDialog extends Dialog {
private Button fVarBookKeeping;
@@ -154,6 +163,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
}
}
+ @Override
+ public String getId() {
+ return TAB_ID;
+ }
+
public void createControl(Composite parent) {
fContainer = new ScrolledComposite( parent, SWT.V_SCROLL | SWT.H_SCROLL );
fContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainAttachTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainAttachTab.java
index 3ff3914c9a6..c310ba0c088 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainAttachTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainAttachTab.java
@@ -14,7 +14,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
public class CMainAttachTab extends CMainTab {
-
+
public boolean isValid(ILaunchConfiguration config) {
if (super.isValid(config) == false) {
String name = fProgText.getText().trim();
@@ -26,5 +26,4 @@ public class CMainAttachTab extends CMainTab {
}
return true;
}
-
}
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 b9d80510b63..8e4c9dbb07c 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
@@ -81,6 +81,15 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
public class CMainTab extends CLaunchConfigurationTab {
+ /**
+ * Tab identifier used for ordering of tabs added using the
+ * <code>org.eclipse.debug.ui.launchConfigurationTabs</code>
+ * extension point.
+ *
+ * @since 6.0
+ */
+ public static final String TAB_ID = "org.eclipse.cdt.cdi.launch.mainTab";
+
// Project UI widgets
protected Label fProjLabel;
protected Text fProjText;
@@ -780,6 +789,12 @@ public class CMainTab extends CLaunchConfigurationTab {
}
}
+ @Override
+ public String getId() {
+ return TAB_ID;
+ }
+
+
/*
* (non-Javadoc)
*

Back to the top