# HG changeset patch # User Ken Ryall # Date 1271194065 21600 # Node ID 54c7e69fdb2ce89a2aa5d85bbc62c8cdbadcaf20 # Parent e265bbe56eb0fd937c881ab7ca9ef30517771985 Make EDC the default launcher for TRK launch configuration types. diff -r e265bbe56eb0 -r 54c7e69fdb2c debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java --- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Tue Apr 13 15:55:45 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Tue Apr 13 15:27:45 2010 -0600 @@ -21,12 +21,13 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.IBinaryParser; +import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.ICExtensionReference; -import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CoreModel; import org.eclipse.cdt.core.model.IBinary; @@ -41,6 +42,8 @@ import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchDelegate; +import org.eclipse.debug.core.ILaunchManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; @@ -358,6 +361,21 @@ configuration.setAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, ""); //$NON-NLS-1$ configuration.setAttribute(PreferenceConstants.J_PN_ProgramArguments, ""); //$NON-NLS-1$ + HashSet set = new HashSet(); + set.add(ILaunchManager.DEBUG_MODE); + try { + ILaunchDelegate preferredDelegate = configuration.getPreferredDelegate(set); + if (preferredDelegate == null) { + if (configuration.getType().getIdentifier().equals(APP_TRK_LAUNCH_TYPE_ID)) { + configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.appTRKLaunchDelegate"); //$NON-NLS-1$ + } else if (configuration.getType().getIdentifier().equals(SYS_TRK_LAUNCH_TYPE_ID)) { + configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.systemTRKLaunchDelegate"); //$NON-NLS-1$ + } else if (configuration.getType().getIdentifier().equals(ATTACH_LAUNCH_TYPE_ID)) { + configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.attachLaunchDelegate"); //$NON-NLS-1$ + } + } + } catch (CoreException e) {} + if (project != null) { String projectName = project.getName(); configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);