--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv2BuildInfo.java Thu Jul 22 15:18:39 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SBSv2BuildInfo.java Thu Jul 22 16:21:19 2010 -0500
@@ -161,10 +161,10 @@
if (!newContextsToQuery.isEmpty()) {
String configQueryXML = SBSv2QueryUtils.getConfigQueryXMLforSDK(sdk, newContextsToQuery);
for (String alias : newContextsToQuery){
- // TODO: Need to test for variants. Right now variants are not added
- if (aliasToMeaningMap.get(alias) == null){
- continue; // This alias is not valid with this SDK, ignore
+ if (!isValidConfigForSDK(alias)){
+ continue;
}
+
ISBSv2ConfigQueryData configQueryData = new SBSv2ConfigQueryData(alias, aliasToMeaningMap.get(alias), configQueryXML);
ISBSv2BuildContext sbsv2Context = new BuildContextSBSv2(sdk, alias, configQueryData);
sbsv2FilteredConetxts.add(sbsv2Context);
@@ -187,6 +187,27 @@
}
+ private boolean isValidConfigForSDK(String alias) {
+ if (!alias.contains(".") && aliasToMeaningMap.get(alias) == null){
+ return false;
+ }
+
+ // test variant
+ String[] configTokens = alias.split("\\.");
+ if (aliasToMeaningMap.get(configTokens[0]) == null){
+ return false;
+ }
+
+ if (productList != null && productList.size() > 0)
+ for (String tok : configTokens){
+ if (productList.contains(tok)){
+ return true;
+ }
+ }
+
+ return false;
+ }
+
private void initSBSv2BuildContextList(List<String> allowedConfigs) throws SBSv2MinimumVersionException {
List<String> filteredAliasList = new ArrayList<String>();