fixed bug #9283.
authorwpaul
Thu, 13 Aug 2009 14:56:19 -0500
changeset 438 1137da10d4e5
parent 437 d19f4087230d
child 439 a29cb5e793d3
fixed bug #9283.
debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/CarbideExecutablesProvider.java
--- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/CarbideExecutablesProvider.java	Thu Aug 13 14:40:37 2009 -0500
+++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/CarbideExecutablesProvider.java	Thu Aug 13 14:56:19 2009 -0500
@@ -35,6 +35,7 @@
 
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
 import com.nokia.carbide.cdt.builder.EpocEngineHelper;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
 
 public class CarbideExecutablesProvider implements IProjectExecutablesProvider {
@@ -58,30 +59,33 @@
 		if (CarbideBuilderPlugin.getBuildManager().isCarbideProject(project)) {
 			ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
 			if (cpi != null) {
-				List<IPath> mmps = EpocEngineHelper.getMMPFilesForBuildConfiguration(cpi.getDefaultConfiguration());
+				ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
+				if (config != null) {
+					List<IPath> mmps = EpocEngineHelper.getMMPFilesForBuildConfiguration(config);
 
-				SubMonitor progress = SubMonitor.convert(monitor, mmps.size());
+					SubMonitor progress = SubMonitor.convert(monitor, mmps.size());
 
-				for (IPath mmp : mmps) {
-					if (progress.isCanceled()) {
-						break;
-					}
-					
-					progress.subTask("Parsing " + mmp.lastSegment());
+					for (IPath mmp : mmps) {
+						if (progress.isCanceled()) {
+							break;
+						}
+						
+						progress.subTask("Parsing " + mmp.lastSegment());
 
- 					IPath hp = EpocEngineHelper.getHostPathForExecutable(cpi.getDefaultConfiguration(), mmp);
-					if (hp != null) {
-						File hpFile = hp.toFile();
-						if (hpFile.exists()) {
-							try {
-								Executable exe = new Executable(new Path(hpFile.getCanonicalPath()), project, null);
-								executables.add(exe);
-							} catch (Exception e) {
+	 					IPath hp = EpocEngineHelper.getHostPathForExecutable(config, mmp);
+						if (hp != null) {
+							File hpFile = hp.toFile();
+							if (hpFile.exists()) {
+								try {
+									Executable exe = new Executable(new Path(hpFile.getCanonicalPath()), project, null);
+									executables.add(exe);
+								} catch (Exception e) {
+								}
 							}
 						}
+						
+						progress.worked(1);
 					}
-					
-					progress.worked(1);
 				}
 			}
 		}