1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

Bug 262826 - Create common C/C++ launch configurations

This commit is contained in:
Pawel Piech 2009-02-27 22:38:54 +00:00
parent 22b507266d
commit b006bc98c3
37 changed files with 881 additions and 245 deletions

View file

@ -14,6 +14,10 @@
pluginName=C/C++ Development Tools Debug Model pluginName=C/C++ Development Tools Debug Model
providerName=Eclipse.org 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 CDebugger.name=C/C++ Development Tools Core Debugger Extension
BreakpointAction.name=Breakpoint Action Extension BreakpointAction.name=Breakpoint Action Extension

View file

@ -6,6 +6,25 @@
<extension-point id="BreakpointActionType" name="%BreakpointAction" schema="schema/BreakpointAction.exsd"/> <extension-point id="BreakpointActionType" name="%BreakpointAction" schema="schema/BreakpointAction.exsd"/>
<extension-point id="BreakpointExtension" name="%BreakpointAction" schema="schema/BreakpointExtension.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 <extension
id="cBreakpointMarker" id="cBreakpointMarker"
point="org.eclipse.core.resources.markers"> point="org.eclipse.core.resources.markers">

View file

@ -28,6 +28,8 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult; 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.cdi.CDIException;
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint; import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpoint; 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.cdt.debug.internal.core.model.CFloatingPointValue;
import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.IStatusHandler; import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.core.model.IBreakpoint; import org.eclipse.debug.core.model.IBreakpoint;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@ -511,4 +515,50 @@ public class CDebugUtils {
return fDecoder; 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);
}
} }

View file

@ -17,9 +17,23 @@ public interface ICDTLaunchConfigurationConstants {
public static final String CDT_LAUNCH_ID = "org.eclipse.cdt.launch"; //$NON-NLS-1$ 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 * Identifier for the C/C++ program process type, which is annotated on processes created

View file

@ -189,3 +189,9 @@ breapointType.regular.label=Regular
breapointType.hardware.label=Hardware breapointType.hardware.label=Hardware
breapointType.temporay.label=Temporary breapointType.temporay.label=Temporary
breapointType.hardwaretemporaty.label=Hardware 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

View file

@ -7,6 +7,119 @@
<extension-point id="breakpointContribution" name="%breakpointContribution" schema="schema/BreakpointUIContribution.exsd"/> <extension-point id="breakpointContribution" name="%breakpointContribution" schema="schema/BreakpointUIContribution.exsd"/>
<!-- Extensions --> <!-- 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 <extension
point="org.eclipse.debug.ui.debugModelPresentations"> point="org.eclipse.debug.ui.debugModelPresentations">
<debugModelPresentation <debugModelPresentation

View file

@ -9,7 +9,7 @@
* QNX Software Systems - Initial API and implementation * QNX Software Systems - Initial API and implementation
* Ken Ryall (Nokia) - bug 178731 * 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.lang.reflect.InvocationTargetException;
import java.util.ArrayList; 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.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; 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.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration; import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin; import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.ICDebuggerPage; 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.cdt.ui.CElementLabelProvider;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; 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.jface.window.Window;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.dialogs.ElementListSelectionDialog; import org.eclipse.ui.dialogs.ElementListSelectionDialog;
import org.eclipse.ui.dialogs.TwoPaneElementSelector; import org.eclipse.ui.dialogs.TwoPaneElementSelector;
@ -94,8 +93,8 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
candidateConfigs = new ArrayList(configs.length); candidateConfigs = new ArrayList(configs.length);
for (int i = 0; i < configs.length; i++) { for (int i = 0; i < configs.length; i++) {
ILaunchConfiguration config = configs[i]; ILaunchConfiguration config = configs[i];
IPath programPath = AbstractCLaunchDelegate.getProgramPath(config); IPath programPath = CDebugUtils.getProgramPath(config);
String projectName = AbstractCLaunchDelegate.getProjectName(config); String projectName = CDebugUtils.getProjectName(config);
IPath name = bin.getResource().getProjectRelativePath(); IPath name = bin.getResource().getProjectRelativePath();
if (programPath != null && programPath.equals(name)) { if (programPath != null && programPath.equals(name)) {
if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) { if (projectName != null && projectName.equals(bin.getCProject().getProject().getName())) {
@ -104,7 +103,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
} }
} }
} catch (CoreException e) { } catch (CoreException e) {
LaunchUIPlugin.log(e); CDebugUIPlugin.log(e);
} }
// If there are no existing configs associated with the IBinary, create one. // If there are no existing configs associated with the IBinary, create one.
@ -207,7 +206,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
config = wc.doSave(); config = wc.doSave();
} catch (CoreException ce) { } catch (CoreException ce) {
LaunchUIPlugin.log(ce); CDebugUIPlugin.log(ce);
} }
return config; return config;
} }
@ -228,7 +227,11 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
* Convenience method to get the window that owns this action's Shell. * Convenience method to get the window that owns this action's Shell.
*/ */
protected Shell getShell() { protected Shell getShell() {
return LaunchUIPlugin.getActiveWorkbenchShell(); IWorkbenchWindow w = CDebugUIPlugin.getDefault().getActiveWorkbenchWindow();
if (w != null) {
return w.getShell();
}
return null;
} }
/** /**

View file

@ -9,7 +9,7 @@
* IBM Corporation - initial implementation * IBM Corporation - initial implementation
* Ken Ryall (Nokia) - Modified to launch on a project context. * 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.CoreModel;
import org.eclipse.cdt.core.model.IBinary; import org.eclipse.cdt.core.model.IBinary;

View file

@ -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 + '!';
}
}
}

View file

@ -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:

View file

@ -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]);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -35,3 +35,9 @@ command.reverseStepOver.label = Reverse StepOver
command.uncall.name = Uncall command.uncall.name = Uncall
command.uncall.description = Perform Uncall command.uncall.description = Perform Uncall
command.uncall.label = 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

View file

@ -2,43 +2,123 @@
<?eclipse version="3.0"?> <?eclipse version="3.0"?>
<plugin> <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 <extension
point="org.eclipse.debug.ui.launchConfigurationTabGroups"> 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 <launchConfigurationTabGroup
class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup" class="org.eclipse.cdt.dsf.gdb.internal.ui.launching.GdbRemoteRunLaunchConfigurationTabGroup"
id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchTabGroup" id="org.eclipse.cdt.dsf.gdb.launch.remoteRunLaunchTabGroup"
type="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"> type="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch">
</launchConfigurationTabGroup> </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>
<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"> <extension point="org.eclipse.core.runtime.adapters">
<factory <factory

View file

@ -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);
}
}

View file

@ -48,6 +48,15 @@ import org.eclipse.swt.widgets.Text;
*/ */
public class CArgumentsTab extends CLaunchConfigurationTab { 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 // Program arguments UI widgets
protected Label fPrgmArgumentsLabel; protected Label fPrgmArgumentsLabel;
protected Text fPrgmArgumentsText; protected Text fPrgmArgumentsText;
@ -222,6 +231,11 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
return null; return null;
} }
@Override
public String getId() {
return TAB_ID;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/ */

View file

@ -61,6 +61,15 @@ import org.eclipse.swt.widgets.Text;
public class CDebuggerTab extends AbstractCDebuggerTab { 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 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$ private final static String REMOTE_DEBUGGER_ID = "org.eclipse.cdt.dsf.gdb.GdbServerDebugger";//$NON-NLS-1$
@ -85,6 +94,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
} }
} }
@Override
public String getId() {
return TAB_ID;
}
@Override @Override
public void createControl(Composite parent) { public void createControl(Composite parent) {
fContainer = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); fContainer = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);

View file

@ -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
}
}

View file

@ -71,6 +71,15 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
public class CMainTab extends CLaunchConfigurationTab { 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 // Project UI widgets
protected Label fProjLabel; protected Label fProjLabel;
protected Text fProjText; protected Text fProjText;
@ -697,6 +706,11 @@ public class CMainTab extends CLaunchConfigurationTab {
} }
} }
@Override
public String getId() {
return TAB_ID;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -11,3 +11,9 @@
pluginName=GDB DSF Debugger Integration Core pluginName=GDB DSF Debugger Integration Core
providerName=Eclipse.org 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.

View file

@ -2,34 +2,38 @@
<?eclipse version="3.0"?> <?eclipse version="3.0"?>
<plugin> <plugin>
<extension point="org.eclipse.debug.core.launchConfigurationTypes"> <!-- TODO: externalize the strings. For some reason strings from plugin.properties are not working -->
<launchConfigurationType <extension point="org.eclipse.debug.core.launchDelegates">
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator" <launchDelegate
delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
public="true"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
name="C/C++ Local Application (Experimental - DSF)"
id="org.eclipse.cdt.dsf.gdb.launch.localCLaunch" id="org.eclipse.cdt.dsf.gdb.launch.localCLaunch"
modes="debug"> type="org.eclipse.cdt.launch.applicationLaunchType"
</launchConfigurationType> modes="debug"
<launchConfigurationType
delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate" 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" id="org.eclipse.cdt.dsf.gdb.launch.remoteCLaunch"
type="org.eclipse.cdt.launch.applicationLaunchType"
modes="debug" modes="debug"
name="C/C++ Remote Application (Experimental - DSF)"
public="true"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchConfigurationType>
<launchConfigurationType
delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate" delegate="org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate"
id="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch" name="GDB (DSF) Remote System Process"
modes="debug" delegateDescription="Start new application on a remote system under control of GDB debugger integrated using the Debugger Services Framework (DSF)"
name="C/C++ Attach to Running Application (Experimental - DSF)"
public="true"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator" sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"> sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchConfigurationType> </launchDelegate>
<launchDelegate
id="org.eclipse.cdt.dsf.gdb.launch.attachCLaunch"
type="org.eclipse.cdt.launch.attachLaunchType"
modes="debug"
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">
</launchDelegate>
</extension> </extension>
<extension <extension

View file

@ -11,11 +11,17 @@
pluginName=C/C++ Development Tools Launching Support pluginName=C/C++ Development Tools Launching Support
providerName=Eclipse.org providerName=Eclipse.org
LocalCDTLaunch.name=C/C++ Local Application LocalCDTLaunch.name=Standard Create Process
LocalAttachCDTLaunch.name=C/C++ Attach to Local Application LocalCDTLaunch.description=Start new application optionally under control of the standard debugger.
CoreFileCDTLaunch.name=C/C++ Postmortem debugger LocalAttachCDTLaunch.name=Standard Attach to Process
LocalAttachCDTLaunch.description=Attach standard debugger to a running program using.
CApplicationShortcut.label=Local C/C++ Application CoreFileCDTLaunch.name=Standard Postmortem Debugger
ContextualRunCApplication.description=Runs a local C/C++ application CoreFileCDTLaunch.description=Load an application dump into the standard debugger.
ContextualDebugCApplication.description=Debugs a local C/C++ application
MainLaunchTab.name=Main
ArgumentsLaunchTab.name=Arguments
EnvironmentLaunchTab.name=Environment
DebuggerLaunchTab.name=Debugger
SourceLookupLaunchTab.name=Source
CommonLaunchTab.name=Common
CoreFileLaunchTab.name=Debugger

View file

@ -3,124 +3,155 @@
<plugin> <plugin>
<extension <extension
point="org.eclipse.debug.core.launchConfigurationTypes"> point="org.eclipse.debug.core.launchDelegates">
<launchConfigurationType <launchDelegate
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator" id="org.eclipse.cdt.cdi.launch.localCLaunch"
type="org.eclipse.cdt.launch.applicationLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate" delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
public="true" modes="run,debug"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
name="%LocalCDTLaunch.name" name="%LocalCDTLaunch.name"
id="org.eclipse.cdt.launch.localCLaunch" delegateDescription="%LocalCDTLaunch.description"
modes="run,debug"> sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
</launchConfigurationType> sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
<launchConfigurationType </launchDelegate>
<launchDelegate
id="org.eclipse.cdt.cdi.launch.localCAttachLaunch"
type="org.eclipse.cdt.launch.attachLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate" delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
id="org.eclipse.cdt.launch.localAttachCLaunch"
modes="debug" modes="debug"
name="%LocalAttachCDTLaunch.name" name="%LocalAttachCDTLaunch.name"
public="true" delegateDescription="%LocalAttachCDTLaunch.description"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator" sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"> sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchConfigurationType> </launchDelegate>
<launchConfigurationType <launchDelegate
id="org.eclipse.cdt.cdi.launch.coreFileCLaunch"
type="org.eclipse.cdt.launch.postmortemLaunchType"
delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate" delegate="org.eclipse.cdt.launch.internal.LocalCDILaunchDelegate"
id="org.eclipse.cdt.launch.coreFileCLaunch"
modes="debug" modes="debug"
name="%CoreFileCDTLaunch.name" name="%CoreFileCDTLaunch.name"
public="true" delegateDescription="%CoreFileCDTLaunch.description"
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator" sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"> sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
</launchConfigurationType> </launchDelegate>
</extension> </extension>
<extension <extension
point="org.eclipse.debug.ui.launchConfigurationTypeImages"> point="org.eclipse.debug.ui.launchConfigurationTabs">
<launchConfigurationTypeImage <!-- Application launch tabs-->
icon="icons/obj16/c_app.gif" <tab
configTypeID="org.eclipse.cdt.launch.localCLaunch" id="org.eclipse.cdt.cdi.launch.applicationLaunch.mainTab"
id="org.eclipse.cdt.launch.localRunLaunchImage"> group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
</launchConfigurationTypeImage> name="%MainLaunchTab.name"
<launchConfigurationTypeImage class="org.eclipse.cdt.launch.ui.CMainTab">
icon="icons/obj16/c_app.gif" <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
configTypeID="org.eclipse.cdt.launch.localAttachCLaunch" </tab>
id="org.eclipse.cdt.launch.localAttachLaunchImage"> <tab
</launchConfigurationTypeImage> id="org.eclipse.cdt.cdi.launch.applicationLaunch.argumentsTab"
<launchConfigurationTypeImage group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
icon="icons/obj16/c_app.gif" name="%ArgumentsLaunchTab.name"
configTypeID="org.eclipse.cdt.launch.coreFileCLaunch" class="org.eclipse.cdt.launch.ui.CArgumentsTab">
id="org.eclipse.cdt.launch.coreFileLaunchImage"> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
</launchConfigurationTypeImage> <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
</extension> </tab>
<extension <tab
point="org.eclipse.debug.ui.launchConfigurationTabGroups"> id="org.eclipse.cdt.cdi.launch.applicationLaunch.environmentTab"
<launchConfigurationTabGroup group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
type="org.eclipse.cdt.launch.localCLaunch" name="%EnvironmentLaunchTab.name"
class="org.eclipse.cdt.launch.internal.ui.LocalRunLaunchConfigurationTabGroup" class="org.eclipse.debug.ui.EnvironmentTab">
id="org.eclipse.cdt.launch.localRunLaunchTabGroup"> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
</launchConfigurationTabGroup> <placement after="org.eclipse.cdt.cdi.launch.argumentsTab"/>
<launchConfigurationTabGroup </tab>
type="org.eclipse.cdt.launch.localAttachCLaunch" <tab
class="org.eclipse.cdt.launch.internal.ui.LocalAttachLaunchConfigurationTabGroup" id="org.eclipse.cdt.cdi.launch.applicationLaunch.debuggerTab"
id="org.eclipse.cdt.launch.localAttachLaunchTabGroup"> group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
</launchConfigurationTabGroup> name="%DebuggerLaunchTab.name"
<launchConfigurationTabGroup class="org.eclipse.cdt.launch.ui.ApplicationCDebuggerTab">
type="org.eclipse.cdt.launch.coreFileCLaunch" <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
class="org.eclipse.cdt.launch.internal.ui.CoreFileLaunchConfigurationTabGroup" <placement after="org.eclipse.debug.ui.environmentTab"/>
id="org.eclipse.cdt.launch.coreFileCLaunchTabGroup"> </tab>
</launchConfigurationTabGroup> <tab
</extension> id="org.eclipse.cdt.cdi.launch.applicationLaunch.sourceLookupTab"
<extension group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
point="org.eclipse.debug.ui.launchShortcuts"> name="%SourceLookupLaunchTab.name"
<shortcut class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
label="%CApplicationShortcut.label" <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
icon="icons/obj16/c_app.gif" <placement after="org.eclipse.cdt.cdi.launch.debuggerTab"/>
modes="run, debug" </tab>
class="org.eclipse.cdt.launch.internal.CApplicationLaunchShortcut" <tab
id="org.eclipse.cdt.debug.ui.localCShortcut"> id="org.eclipse.cdt.cdi.launch.applicationLaunch.commonTab"
<contextualLaunch> group="org.eclipse.cdt.launch.applicationLaunchTabGroup"
<enablement> name="%CommonLaunchTab.name"
<with variable="selection"> class="org.eclipse.debug.ui.CommonTab">
<count value="1"/> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCLaunch"/>
<iterate> <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
<or> </tab>
<instanceof value="org.eclipse.cdt.core.model.IBinary"/>
<instanceof value="org.eclipse.cdt.core.model.ICProject"/> <!-- Attach launch tabs-->
<test <tab
forcePluginActivation="true" id="org.eclipse.cdt.cdi.launch.attachLaunch.mainAttachTab"
property="org.eclipse.cdt.launch.isExecutable"/> group="org.eclipse.cdt.launch.attachLaunchTabGroup"
<test name="%MainLaunchTab.name"
forcePluginActivation="true" class="org.eclipse.cdt.launch.ui.CMainAttachTab">
property="org.eclipse.cdt.launch.isCProject"/> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
<and> </tab>
<instanceof value="org.eclipse.ui.IFileEditorInput"/> <tab
<adapt type="org.eclipse.core.resources.IResource"> id="org.eclipse.cdt.cdi.launch.attachLaunch.debuggerTab"
<adapt type="org.eclipse.cdt.core.model.ICElement"/> group="org.eclipse.cdt.launch.attachLaunchTabGroup"
</adapt> name="%DebuggerLaunchTab.name"
</and> class="org.eclipse.cdt.launch.ui.AttachCDebuggerTab">
</or> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
</iterate> <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
</with> </tab>
</enablement> <tab
</contextualLaunch> id="org.eclipse.cdt.cdi.launch.attachLaunch.sourceLookupTab"
<description group="org.eclipse.cdt.launch.attachLaunchTabGroup"
mode="run" name="%SourceLookupLaunchTab.name"
description="%ContextualRunCApplication.description"/> class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab">
<description <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
mode="debug" <placement after="org.eclipse.cdt.cdi.launch.debuggerTab"/>
description="%ContextualDebugCApplication.description"/> </tab>
<configurationType <tab
id="org.eclipse.cdt.launch.localCLaunch"> id="org.eclipse.cdt.cdi.launch.attachLaunch.commonTab"
</configurationType> group="org.eclipse.cdt.launch.attachLaunchTabGroup"
</shortcut> name="%CommonLaunchTab.name"
</extension> class="org.eclipse.debug.ui.CommonTab">
<!-- Property testers --> <associatedDelegate delegate="org.eclipse.cdt.cdi.launch.localCAttachLaunch"/>
<extension point="org.eclipse.core.expressions.propertyTesters"> <placement after="org.eclipse.debug.ui.sourceLookupTab"/>
<propertyTester </tab>
namespace="org.eclipse.cdt.launch"
properties="isExecutable,isCProject" <!-- Post mortem launch tabs-->
type="org.eclipse.core.runtime.IAdaptable" <tab
class="org.eclipse.cdt.launch.internal.CPropertyTester" id="org.eclipse.cdt.cdi.launch.postmortemLaunch.mainTab"
id="org.eclipse.cdt.launch.CPropertyTester"> group="org.eclipse.cdt.launch.postmortemLaunchTabGroup"
</propertyTester> 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>
<extension <extension
point="org.eclipse.debug.core.statusHandlers"> point="org.eclipse.debug.core.statusHandlers">
@ -138,23 +169,4 @@
</statusHandler> </statusHandler>
</extension> </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> </plugin>

View file

@ -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.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; 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.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration; import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin; import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
@ -173,35 +174,32 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
abstract protected String getPluginID(); abstract protected String getPluginID();
/**
* @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
*/
public static ICProject getCProject(ILaunchConfiguration configuration) throws CoreException { public static ICProject getCProject(ILaunchConfiguration configuration) throws CoreException {
String projectName = getProjectName(configuration); return CDebugUtils.getCProject(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;
} }
/**
* @deprecated Use {@link org.eclipse.cdt.debug.core.CDebugUtils} instead.
*/
public static String getProjectName(ILaunchConfiguration configuration) throws CoreException { 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 { 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 { public static IPath getProgramPath(ILaunchConfiguration configuration) throws CoreException {
String path = getProgramName(configuration); return CDebugUtils.getProgramPath(configuration);
if (path == null || path.trim().length() == 0) {
return null;
}
return new Path(path);
} }
/** /**
@ -233,7 +231,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
IPersistableSourceLocator sourceLocator; IPersistableSourceLocator sourceLocator;
String id = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null); String id = configuration.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null);
if (id == null) { if (id == null) {
ICProject cProject = getCProject(configuration); ICProject cProject = CDebugUtils.getCProject(configuration);
if (cProject == null) { if (cProject == null) {
abort(LaunchMessages.getString("Launch.common.Project_does_not_exist"), null, //$NON-NLS-1$ abort(LaunchMessages.getString("Launch.common.Project_does_not_exist"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT); ICDTLaunchConfigurationConstants.ERR_NOT_A_C_PROJECT);
@ -330,7 +328,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
@Deprecated @Deprecated
protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException { protected IFile getProgramFile(ILaunchConfiguration config) throws CoreException {
ICProject cproject = verifyCProject(config); ICProject cproject = verifyCProject(config);
String fileName = getProgramName(config); String fileName = CDebugUtils.getProgramName(config);
if (fileName == null) { if (fileName == null) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$ abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM); ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM);
@ -349,12 +347,12 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
} }
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException { protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
String name = getProjectName(config); String name = CDebugUtils.getProjectName(config);
if (name == null) { if (name == null) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.C_Project_not_specified"), null, //$NON-NLS-1$ abort(LaunchMessages.getString("AbstractCLaunchDelegate.C_Project_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT); ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
} }
ICProject cproject = getCProject(config); ICProject cproject = CDebugUtils.getCProject(config);
if (cproject == null) { if (cproject == null) {
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name); IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!proj.exists()) { if (!proj.exists()) {
@ -373,7 +371,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
protected IPath verifyProgramPath(ILaunchConfiguration config) throws CoreException { protected IPath verifyProgramPath(ILaunchConfiguration config) throws CoreException {
ICProject cproject = verifyCProject(config); ICProject cproject = verifyCProject(config);
IPath programPath = getProgramPath(config); IPath programPath = CDebugUtils.getProgramPath(config);
if (programPath == null || programPath.isEmpty()) { if (programPath == null || programPath.isEmpty()) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$ abort(LaunchMessages.getString("AbstractCLaunchDelegate.Program_file_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROGRAM); 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. // Try the old way, which is required to support linked resources.
IFile projFile = null; IFile projFile = null;
try { 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") catch (IllegalArgumentException exc) {} // thrown if relative path that resolves to a root file (e.g., "..\somefile")
if (projFile != null && projFile.exists()) { if (projFile != null && projFile.exists()) {
@ -426,7 +424,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
IPath path = getWorkingDirectoryPath(configuration); IPath path = getWorkingDirectoryPath(configuration);
if (path == null) { if (path == null) {
// default working dir is the project if this config has a project // default working dir is the project if this config has a project
ICProject cp = getCProject(configuration); ICProject cp = CDebugUtils.getCProject(configuration);
if (cp != null) { if (cp != null) {
IProject p = cp.getProject(); IProject p = cp.getProject();
return p.getLocation().toFile(); return p.getLocation().toFile();
@ -723,7 +721,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
// build project list // build project list
orderedProjects = null; orderedProjects = null;
ICProject cProject = getCProject(configuration); ICProject cProject = CDebugUtils.getCProject(configuration);
if (cProject != null) { if (cProject != null) {
project = cProject.getProject(); project = cProject.getProject();
HashSet projectSet = new HashSet(); HashSet projectSet = new HashSet();

View file

@ -16,6 +16,7 @@ import java.io.File;
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.CDIDebugModel; 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.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration; import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.CDIException;
@ -58,7 +59,7 @@ public class CoreFileLaunchDelegate extends AbstractCLaunchDelegate {
ICDebugConfiguration debugConfig = getDebugConfig(config); ICDebugConfiguration debugConfig = getDebugConfig(config);
ICDISession dsession = null; ICDISession dsession = null;
ICProject cproject = getCProject(config); ICProject cproject = CDebugUtils.getCProject(config);
String path = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null); String path = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, (String)null);
if (path == null) { if (path == null) {

View file

@ -11,9 +11,11 @@
package org.eclipse.cdt.launch.internal; package org.eclipse.cdt.launch.internal;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.debug.core.CDIDebugModel; 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.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.ICDebugConfiguration; import org.eclipse.cdt.debug.core.ICDebugConfiguration;
import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.CDIException;
@ -61,7 +63,7 @@ public class LocalAttachLaunchDelegate extends AbstractCLaunchDelegate {
try { try {
monitor.worked(1); monitor.worked(1);
ICProject cproject = verifyCProject(config); ICProject cproject = verifyCProject(config);
IPath exePath = getProgramPath(config); IPath exePath = CDebugUtils.getProgramPath(config);
if (exePath != null && !exePath.isEmpty()) { if (exePath != null && !exePath.isEmpty()) {
if (!exePath.isAbsolute()) { if (!exePath.isAbsolute()) {
IFile wsProgramPath = cproject.getProject().getFile(exePath); IFile wsProgramPath = cproject.getProject().getFile(exePath);

View file

@ -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.Corefile_not_readable=Core file does not exist or is not readable.
CoreFileLaunchDelegate.postmortem_debugging_failed=Post-mortem debugging failed 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.No_debugger_available=No debugger available
AbstractCDebuggerTab.Debugger=Debugger AbstractCDebuggerTab.Debugger=Debugger
AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component. AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Component.

View file

@ -11,7 +11,9 @@
package org.eclipse.cdt.launch.internal.ui; package org.eclipse.cdt.launch.internal.ui;
import org.eclipse.cdt.core.model.ICProject; 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.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
@ -185,6 +187,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements IDebugEventSetLi
*/ */
public void start(BundleContext context) throws Exception { public void start(BundleContext context) throws Exception {
super.start(context); super.start(context);
LaunchUIPlugin.getDefault().getPluginPreferences().getString( ICDebugConstants.PREF_FILTERED_DEBUGGERS );
DebugPlugin.getDefault().addDebugEventListener(this); DebugPlugin.getDefault().addDebugEventListener(this);
} }
@ -216,7 +219,7 @@ public class LaunchUIPlugin extends AbstractUIPlugin implements IDebugEventSetLi
try { try {
ILaunchConfiguration launchConfig = proc.getLaunch().getLaunchConfiguration(); ILaunchConfiguration launchConfig = proc.getLaunch().getLaunchConfiguration();
if (launchConfig != null) { if (launchConfig != null) {
cproject = AbstractCLaunchDelegate.getCProject(launchConfig); cproject = CDebugUtils.getCProject(launchConfig);
} }
} catch (CoreException e) { } catch (CoreException e) {
} }

View file

@ -13,8 +13,8 @@ package org.eclipse.cdt.launch.internal.ui;
import java.io.File; import java.io.File;
import org.eclipse.cdt.core.model.ICProject; 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.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.launch.AbstractCLaunchDelegate;
import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab; import org.eclipse.cdt.launch.ui.CLaunchConfigurationTab;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
@ -249,7 +249,7 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
try { try {
ILaunchConfiguration config = getLaunchConfiguration(); ILaunchConfiguration config = getLaunchConfiguration();
if (config != null) { if (config != null) {
ICProject cProject = AbstractCLaunchDelegate.getCProject(config); ICProject cProject = CDebugUtils.getCProject(config);
if (cProject != null) { if (cProject != null) {
fWorkingDirText.setText("${workspace_loc:" + cProject.getPath().makeRelative().toOSString() + "}"); //$NON-NLS-1$ //$NON-NLS-2$ fWorkingDirText.setText("${workspace_loc:" + cProject.getPath().makeRelative().toOSString() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
return; return;

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -49,7 +49,16 @@ import org.eclipse.swt.widgets.Text;
*/ */
public class CArgumentsTab extends CLaunchConfigurationTab { 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 Label fPrgmArgumentsLabel;
protected Text fPrgmArgumentsText; protected Text fPrgmArgumentsText;
protected Button fArgumentVariablesButton; protected Button fArgumentVariablesButton;
@ -218,6 +227,12 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
return null; return null;
} }
@Override
public String getId() {
return TAB_ID;
}
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName() * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/ */

View file

@ -65,6 +65,15 @@ import org.eclipse.swt.widgets.Text;
public class CDebuggerTab extends AbstractCDebuggerTab { 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 { public class AdvancedDebuggerOptionsDialog extends Dialog {
private Button fVarBookKeeping; private Button fVarBookKeeping;
@ -154,6 +163,11 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
} }
} }
@Override
public String getId() {
return TAB_ID;
}
public void createControl(Composite parent) { public void createControl(Composite parent) {
fContainer = new ScrolledComposite( parent, SWT.V_SCROLL | SWT.H_SCROLL ); fContainer = new ScrolledComposite( parent, SWT.V_SCROLL | SWT.H_SCROLL );
fContainer.setLayoutData(new GridData(GridData.FILL_BOTH)); fContainer.setLayoutData(new GridData(GridData.FILL_BOTH));

View file

@ -26,5 +26,4 @@ public class CMainAttachTab extends CMainTab {
} }
return true; return true;
} }
} }

View file

@ -81,6 +81,15 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
public class CMainTab extends CLaunchConfigurationTab { 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 // Project UI widgets
protected Label fProjLabel; protected Label fProjLabel;
protected Text fProjText; protected Text fProjText;
@ -780,6 +789,12 @@ public class CMainTab extends CLaunchConfigurationTab {
} }
} }
@Override
public String getId() {
return TAB_ID;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *