Fix problem with sbs config xml parsing. Make sure to trim error message to avoid erroneously adding an error when there is none. Fix problem with adding system includes for variants. C3_BUILDER_WORK
authortimkelly
Mon, 26 Jul 2010 11:32:21 -0500
branchC3_BUILDER_WORK
changeset 1681 6636e8c75e66
parent 1680 336352c21056
child 1682 2ee63cbf206a
Fix problem with sbs config xml parsing. Make sure to trim error message to avoid erroneously adding an error when there is none. Fix problem with adding system includes for variants.
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Fri Jul 23 18:22:58 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Mon Jul 26 11:32:21 2010 -0500
@@ -247,18 +247,22 @@
 		
 		if (context instanceof ISBSv2BuildContext) {
 			// SBSv2 only system includes
-			for (IPath incPath : ((ISBSv2BuildContext)context).getSystemIncludes()) {
-				IPath projRelIncPath = FileUtils.removePrefixFromPath(projectPath, incPath);
-				if (projRelIncPath != null) {
-					includeEntries.add(new CIncludePathEntry(projectPath.append(projRelIncPath), 0));
-				} else {
-					includeEntries.add(new CIncludePathEntry(incPath, 0));
-				}
-
-				// remove duplicate system includes
-				File inc = incPath.toFile();
-				if (systemIncludes.contains(inc)) {
-					systemIncludes.remove(inc);
+			if (((ISBSv2BuildContext)context).getSystemIncludes() != null){
+				// TODO: THIS SHOULD NOT HAPPEN
+			
+				for (IPath incPath : ((ISBSv2BuildContext)context).getSystemIncludes()) {
+					IPath projRelIncPath = FileUtils.removePrefixFromPath(projectPath, incPath);
+					if (projRelIncPath != null) {
+						includeEntries.add(new CIncludePathEntry(projectPath.append(projRelIncPath), 0));
+					} else {
+						includeEntries.add(new CIncludePathEntry(incPath, 0));
+					}
+	
+					// remove duplicate system includes
+					File inc = incPath.toFile();
+					if (systemIncludes.contains(inc)) {
+						systemIncludes.remove(inc);
+					}
 				}
 			}
 		}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java	Fri Jul 23 18:22:58 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java	Mon Jul 26 11:32:21 2010 -0500
@@ -128,13 +128,11 @@
     			if (configNode.getNodeName().equals("config")){
     				NamedNodeMap aliasAttribs = configNode.getAttributes();
     				String dottedName = aliasAttribs.getNamedItem("meaning").getNodeValue();
-    				if (!dottedName.equalsIgnoreCase(meaning)){
+    				if (!dottedName.equalsIgnoreCase(meaning) && meaning != null){
     					continue;
     				}
-    				if (configNode.getTextContent() != null&& configNode.getTextContent().length() > 0){
-    					// The config failed, likely due to envrionment set up issue.
-    					// Save the error message
-    					configurationErrorMessage = configNode.getTextContent();
+    				if (configNode.getTextContent() != null &&  configNode.getTextContent().trim().length() > 0){
+    					configurationErrorMessage = configNode.getTextContent().trim();
     					break;
     				}