# HG changeset patch # User timkelly # Date 1280161941 18000 # Node ID 6636e8c75e666b269b83cdd8ec267a451be61a22 # Parent 336352c21056c548e853d9707f7b7ef01dedc684 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. diff -r 336352c21056 -r 6636e8c75e66 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.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); + } } } } diff -r 336352c21056 -r 6636e8c75e66 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/sbsv2/SBSv2ConfigQueryData.java --- 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; }