merge commit C3_BUILDER_WORK
authortimkelly
Thu, 22 Jul 2010 16:21:59 -0500
branchC3_BUILDER_WORK
changeset 1673 ccc7f4cfe866
parent 1672 43159b8be546 (current diff)
parent 1670 f1324e4c3588 (diff)
child 1674 767ac4954317
merge commit
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java	Thu Jul 22 16:21:19 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java	Thu Jul 22 16:21:59 2010 -0500
@@ -256,7 +256,7 @@
 		
 		ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(buildConfig.getCarbideProject().getProject());
 		if (projDes != null) {
-			ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getDisplayString());
+			ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getConfigurationID());
 			if (configDes != null) {
 				CConfigurationData configData = configDes.getConfigurationData();
 				if (configData != null) {
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Thu Jul 22 16:21:19 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Thu Jul 22 16:21:59 2010 -0500
@@ -153,7 +153,7 @@
 	public List<IDefine> getCompilerMacros() {
 		IPath prefixFile = getCompilerPrefixFile();
 		if (prefixFile == null || !prefixFile.toFile().exists()) {
-			return Collections.emptyList();
+			return getCachedData().getCompilerMacros(null);
 		}
 		
 		return getCachedData().getCompilerMacros(prefixFile);
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java	Thu Jul 22 16:21:19 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContextDataCache.java	Thu Jul 22 16:21:59 2010 -0500
@@ -87,7 +87,16 @@
 	 * @return
 	 */
 	private static String getBuildContextKey(ISymbianBuildContext context) {
-		String key = context.getPlatformString() + "/" + context.getTargetString() + "/";
+		String key;
+		if (context instanceof ISBSv2BuildContext) {
+			// use config ID instead of platform + target since
+			// platform and target can be the same for different build contexts
+			ISBSv2BuildContext v2Context = (ISBSv2BuildContext) context;
+			key = v2Context.getConfigID() + "/";
+		}
+		else {
+			key = context.getPlatformString() + "/" + context.getTargetString() + "/";
+		}
 		ISymbianSDK sdk = context.getSDK();
 		if (sdk != null)
 			key += sdk.getEPOCROOT();
@@ -285,7 +294,8 @@
 		// we assume that the prefix file will not change often,
 		// (if at all) for a build context, so dump the cache if the prefix file changes.
 		
-		if (compilerPrefixFile != null && !compilerPrefixFile.equals(prefixFile)) {
+		if (compilerPrefixFile != null && prefixFile != null && 
+			!compilerPrefixFile.equals(prefixFile)) {
 			compilerPrefixFileInfo = null;
 		}
 		
@@ -342,12 +352,15 @@
 				if (context instanceof ISBSv2BuildContext) {
 					// add macros from raptor query
 					ISBSv2BuildContext v2Context = (ISBSv2BuildContext) context;
-					Map<String, String> buildMacros = v2Context.getConfigQueryData().getBuildMacros();
-					if (buildMacros != null) {
-						for (Iterator<String> itr = buildMacros.keySet().iterator(); itr.hasNext(); ) { 
-							String name = itr.next();
-							String value = buildMacros.get(name);
-							macros.add(DefineFactory.createDefine(name, value));
+					ISBSv2ConfigQueryData configData = v2Context.getConfigQueryData();
+					if (configData != null) {
+						Map<String, String> buildMacros = configData.getBuildMacros();
+						if (buildMacros != null) {
+							for (Iterator<String> itr = buildMacros.keySet().iterator(); itr.hasNext(); ) { 
+								String name = itr.next();
+								String value = buildMacros.get(name);
+								macros.add(DefineFactory.createDefine(name, value));
+							}
 						}
 					}
 				}
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java	Thu Jul 22 16:21:19 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java	Thu Jul 22 16:21:59 2010 -0500
@@ -258,7 +258,7 @@
 		fSDKLink.addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				// I don't see a way to open it to a specific tab, only the page
-				if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(), "com.nokia.carbide.cpp.sdk.ui.preferences.SDKPreferences", null, null, 0).open()){ //$NON-NLS-1$
+				if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(), "com.nokia.carbide.cpp.sdk.ui.preferences.SDKPreferencePage", null, null, 0).open()){ //$NON-NLS-1$
 					inited = false;
 					setVisible(true);
 					TemplateSDKFilter filter = filterCheckbox.getSelection() ? templateFilter : null;