Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2010-05-19 15:43:16 +0000
committerMarc Khouzam2010-05-19 15:43:16 +0000
commit06f8d01d6c98b8da969571f71b4f4430e5cf35d5 (patch)
treedc860f4cb4edc666e29817268a5fef0259d160e6 /launch/org.eclipse.cdt.launch
parent2211e870c65ade480c666355a8677c0c08396014 (diff)
downloadorg.eclipse.cdt-06f8d01d6c98b8da969571f71b4f4430e5cf35d5.tar.gz
org.eclipse.cdt-06f8d01d6c98b8da969571f71b4f4430e5cf35d5.tar.xz
org.eclipse.cdt-06f8d01d6c98b8da969571f71b4f4430e5cf35d5.zip
Bug 312997: Set the default launch delegate using the launch configuration type instead of individual launch configurations. This avoids having the tabs for all launch delegates be created every time, and causing race conditions.
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CMainTab.java28
1 files changed, 0 insertions, 28 deletions
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 2c92c2eecc1..99861b8c525 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
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.eclipse.cdt.launch.ui;
-import java.util.HashSet;
-
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.ICElement;
@@ -34,7 +32,6 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -533,31 +530,6 @@ public class CMainTab extends CAbstractMainTab {
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
- // Workaround for bug 262840
- try {
- HashSet<String> set = new HashSet<String>();
- set.add(ILaunchManager.DEBUG_MODE);
- if ( config.getPreferredDelegate(set) == null && config.getType().getPreferredDelegate(set) == null) {
- if (config.getType().getIdentifier().equals(ICDTLaunchConfigurationConstants.ID_LAUNCH_C_APP)) {
- config.setPreferredLaunchDelegate(set, ICDTLaunchConfigurationConstants.PREFERRED_DEBUG_LOCAL_LAUNCH_DELEGATE);
- } else if (config.getType().getIdentifier().equals(ICDTLaunchConfigurationConstants.ID_LAUNCH_C_ATTACH)) {
- config.setPreferredLaunchDelegate(set, ICDTLaunchConfigurationConstants.PREFERRED_DEBUG_ATTACH_LAUNCH_DELEGATE);
- } else if (config.getType().getIdentifier().equals(ICDTLaunchConfigurationConstants.ID_LAUNCH_C_POST_MORTEM)) {
- config.setPreferredLaunchDelegate(set, ICDTLaunchConfigurationConstants.PREFERRED_DEBUG_POSTMORTEM_LAUNCH_DELEGATE);
- }
- }
- } catch (CoreException e) {}
-
- // We must also set the preferred delegate for Run mode, because this configuration
- // can be used in Run mode.
- try {
- HashSet<String> set = new HashSet<String>();
- set.add(ILaunchManager.RUN_MODE);
- if ( config.getPreferredDelegate(set) == null && config.getType().getPreferredDelegate(set) == null) {
- config.setPreferredLaunchDelegate(set, ICDTLaunchConfigurationConstants.PREFERRED_RUN_LAUNCH_DELEGATE);
- }
- } catch (CoreException e) {}
-
// We set empty attributes for project & program so that when one config
// is
// compared to another, the existence of empty attributes doesn't cause

Back to the top