--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Wed Jun 03 16:36:06 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Wed Jun 03 16:37:17 2009 -0500
@@ -72,7 +72,6 @@
// If you change any of these, please be sure to change them there, as well.
public static final String PREFIX = "com.nokia.cdt.debug.cw.symbian.SettingsData"; //$NON-NLS-1$
- public static final String LaunchConfig_Context= PREFIX + ".LaunchConfig_Context"; //$NON-NLS-1$
public static final String LaunchConfig_Emulator = PREFIX + ".LaunchConfig_Emulator"; //$NON-NLS-1$
public static final String LaunchConfig_AppTRK = PREFIX + ".LaunchConfig_AppTRK"; //$NON-NLS-1$
public static final String LaunchConfig_SysTRK = PREFIX + ".LaunchConfig_SysTRK"; //$NON-NLS-1$
@@ -485,57 +484,51 @@
configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, "" ); //$NON-NLS-1$
// only do this for system TRK configurations
- try {
- if (configuration.getType().getIdentifier().compareTo(SYS_TRK_LAUNCH_TYPE_ID) == 0 ) {
- if (project != null) {
-
- ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
- if (cpi != null) {
- ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
-
- String defaultTargetPath = "C:\\"; //$NON-NLS-1$
- if (buildConfig.getSDK().isEKA2()) {
- // C:\\sys\bin for eka2
- defaultTargetPath += "sys\\bin\\"; //$NON-NLS-1$
+ if (project != null) {
+
+ ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
+ if (cpi != null) {
+ ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
+
+ String defaultTargetPath = "C:\\"; //$NON-NLS-1$
+ if (buildConfig.getSDK().isEKA2()) {
+ // C:\\sys\bin for eka2
+ defaultTargetPath += "sys\\bin\\"; //$NON-NLS-1$
+ }
+ String prefsData = "";
+
+ // we'll add all binaries that could be built by the config, but will only enabled those
+ // that are actually being built.
+ List<IPath> builtComponents = EpocEngineHelper.getComponentsBuiltByConifguration(buildConfig);
+
+ // add the binaries and any resource-type files generated by all mmp files in the project
+ for (IPath mmp : EpocEngineHelper.getMMPFilesForBuildConfiguration(buildConfig)) {
+ String enabled = builtComponents.contains(mmp) ? ",1," : ",0,";
+ IPath hp = EpocEngineHelper.getHostPathForExecutable(buildConfig, mmp);
+ if (hp != null) {
+ IPath tp = EpocEngineHelper.getTargetPathForExecutable(buildConfig, mmp);
+ if (tp == null) {
+ tp = new Path(defaultTargetPath).append(hp.lastSegment());
}
- String prefsData = "";
-
- // we'll add all binaries that could be built by the config, but will only enabled those
- // that are actually being built.
- List<IPath> builtComponents = EpocEngineHelper.getComponentsBuiltByConifguration(buildConfig);
-
- // add the binaries and any resource-type files generated by all mmp files in the project
- for (IPath mmp : EpocEngineHelper.getMMPFilesForBuildConfiguration(buildConfig)) {
- String enabled = builtComponents.contains(mmp) ? ",1," : ",0,";
- IPath hp = EpocEngineHelper.getHostPathForExecutable(buildConfig, mmp);
- if (hp != null) {
- IPath tp = EpocEngineHelper.getTargetPathForExecutable(buildConfig, mmp);
- if (tp == null) {
- tp = new Path(defaultTargetPath).append(hp.lastSegment());
- }
- prefsData += hp.toOSString() + "," + tp.toOSString() + enabled; //$NON-NLS-1$
- }
-
- HashMap<String, String> hostTargetRSRCMap = EpocEngineHelper.getHostAndTargetResources(buildConfig, mmp);
- // Add resource files...
- for (String currHostRSRC : hostTargetRSRCMap.keySet()) {
- prefsData += currHostRSRC + "," + hostTargetRSRCMap.get(currHostRSRC) + new Path(currHostRSRC).lastSegment() + enabled; //$NON-NLS-1$
- }
- }
-
- // check the project for image makefiles
- HashMap<String, String> hostTargetImagesMap = EpocEngineHelper.getHostAndTargetImages(buildConfig);
- for (String currHostImg : hostTargetImagesMap.keySet()) {
- prefsData += currHostImg + "," + hostTargetImagesMap.get(currHostImg) + ",1,"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Add the files to transfer to the pref
- configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, prefsData );
+ prefsData += hp.toOSString() + "," + tp.toOSString() + enabled; //$NON-NLS-1$
+ }
+
+ HashMap<String, String> hostTargetRSRCMap = EpocEngineHelper.getHostAndTargetResources(buildConfig, mmp);
+ // Add resource files...
+ for (String currHostRSRC : hostTargetRSRCMap.keySet()) {
+ prefsData += currHostRSRC + "," + hostTargetRSRCMap.get(currHostRSRC) + new Path(currHostRSRC).lastSegment() + enabled; //$NON-NLS-1$
}
}
+
+ // check the project for image makefiles
+ HashMap<String, String> hostTargetImagesMap = EpocEngineHelper.getHostAndTargetImages(buildConfig);
+ for (String currHostImg : hostTargetImagesMap.keySet()) {
+ prefsData += currHostImg + "," + hostTargetImagesMap.get(currHostImg) + ",1,"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Add the files to transfer to the pref
+ configuration.setAttribute( PreferenceConstants.J_PN_FilesToTransfer, prefsData );
}
- } catch (CoreException e) {
- SymbianPlugin.log(e);
}
}
@@ -712,10 +705,6 @@
setInternalPreferences(configuration, settingsGroup);
- if (settingsGroup.equals(LaunchConfig_Context)) {
- setContextMainTab(configuration, project);
- }
-
if (settingsGroup.equals(LaunchConfig_Emulator)) {
setEmulationMainTab(configuration, project);
setEmulationDebuggerTab(configuration, project);
@@ -730,9 +719,13 @@
}
if (settingsGroup.equals(LaunchConfig_AppTRK)) {
- setInstallationTab(configuration, project);
+ setInstallationTab(configuration, project);
}
+ if (settingsGroup.equals(LaunchConfig_SysTRK)) {
+ setFileTransferTab(configuration, project);
+ }
+
if (settingsGroup.equals(LaunchConfig_Trace32) ||
settingsGroup.equals(LaunchConfig_SophiaSTI))
{
@@ -744,8 +737,6 @@
if (settingsGroup.equals(LaunchConfig_AppTRK) || settingsGroup.equals(LaunchConfig_SysTRK)) {
setTrkMainTab(configuration, project);
setTrkDebuggerTab(configuration, project);
- setFileTransferTab(configuration, project);
-
// TRK Debugging: specify TRK protocol plugin.
//
@@ -818,17 +809,6 @@
}
- private static void setContextMainTab(
- ILaunchConfigurationWorkingCopy configuration, IProject project) {
- if (project != null) {
- String projectName = project.getName();
- configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName);
- configuration.setMappedResources( new IResource[] { project });
- configuration.rename(DebugPlugin.getDefault().getLaunchManager().generateUniqueLaunchConfigurationNameFrom(projectName));
- }
- }
-
-
/**
* Should the debugger launch the Symbian emulator (epoc.exe) as the debug process?
* This should be true in all cases except when the executable is an '.exe'.