1) Reworking cconfiguration 'id' to be separate from the config display name C3_BUILDER_WORK
authortimkelly
Fri, 04 Jun 2010 16:34:02 -0500
branchC3_BUILDER_WORK
changeset 1433 1a693b01d107
parent 1431 536cdcdc768b
child 1434 79471fd1fd69
child 1437 8534c28043b9
1) Reworking cconfiguration 'id' to be separate from the config display name 2) For SBSv2, show configs that live in the project but are otherwise filtered out when managing configs (still needs cleanup) Support for building older 2.x SBSv2 projects not working yet.
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java
core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetTreeNode.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Fri Jun 04 16:34:02 2010 -0500
@@ -168,5 +168,7 @@
 	
 	/** TODO: Detect on instanceof ? */
 	public String getBuildVariationName();
+
+	String getConfigurationID();
 	
 }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java	Fri Jun 04 16:34:02 2010 -0500
@@ -60,6 +60,7 @@
 import com.nokia.carbide.cdt.internal.builder.xml.CarbideBuildConfigurationLoader;
 import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv2;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
@@ -124,77 +125,21 @@
 				throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "Project " + project.getName() + " is not a valid Carbide project.", null));
 			}
 			
-			// find the configuration that matches the id (sdk, platform, target)
-			String configId = des.getConfiguration().getId();
-			// TODO: We should be able to get the build context from the SBSv2 data, if present,
-			// otherwise from the display name for ABLD
 			ISymbianBuildContext context = null;
-			String buidAlias = "";
-			String platform = "";
-			String target = "";
-			String displayString = "";
-			String variant = "";
-			String sdkID = null;
 			if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
-				ICStorageElement rootStorage = des.getStorage(CarbideBuildConfiguration.CARBIDE_STORAGE_ID, false);
-				if (rootStorage != null) {
-					for (ICStorageElement se : rootStorage.getChildren()) {
-						if (se.getName().equals(
-								CarbideBuildConfiguration.SBSV2_DATA_ID)) {
-							String value = se.getAttribute(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM);
-							if (value != null) {
-								platform = value;
-							}
-
-							value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT);
-							if (value != null) {
-								variant = value;
-							}
-
-							value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_CONFIG_TARGET);
-							if (value != null) {
-								target = value;
-							}
-
-							value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS);
-							if (value != null) {
-								buidAlias = value;
-							}
-
-							value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_CONFIG_DISPLAY_STRING);
-							if (value != null) {
-								displayString = value;
-							}
-							
-							value = se
-							.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_SDK_ID);
-							if (value != null) {
-								sdkID = value;
-							}
-						}
-					}
-				} else {
+				
+				context = loadSBSv2Configuration(des, monitor);
+				
+				if (context == null){
 					throw new CoreException(new Status(IStatus.ERROR,
 							CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK,
 							"Unable to load Carbide settings for project "
 									+ project.getProject().getName(), null));
 				}
-				
-				ISymbianSDK sdk = null;
-				if (sdkID == null){
-					// pre-C3 project, get SDK id from config name
-					sdkID = BuildContextSBSv2.getSDKIDFromConfigName(displayString);
-				}
-				if (sdkID != null){
-					sdk = SDKCorePlugin.getSDKManager().getSDK(sdkID, true);
-					// TODO: NEED TO HANDLE MISSING SDK ID
-					if (sdk != null){
-						context = new BuildContextSBSv2(sdk, platform, target, buidAlias);
-					}
-				}
-				
 			} else {
 				// TODO: Presume it's SBSv1?
+				// find the configuration that matches the id (sdk, platform, target)
+				String configId = des.getConfiguration().getId();
 				context = BuildContextSBSv1.getBuildContextFromDisplayName(configId);
 			}
 			
@@ -216,6 +161,91 @@
 		return null;
 	}
 
+	private ISymbianBuildContext loadSBSv2Configuration(ICConfigurationDescription des, 
+														IProgressMonitor monitor) {
+		
+		ICStorageElement rootStorage;
+		try {
+			rootStorage = des.getStorage(CarbideBuildConfiguration.CARBIDE_STORAGE_ID, false);
+		} catch (CoreException e) {
+			return null;
+		}
+		String configID = des.getConfiguration().getId();
+		String buidAlias = "";
+		String platform = "";
+		String target = "";
+		String displayString = null;
+		String variant = "";
+		String sdkID = null;
+		if (rootStorage != null) {
+			for (ICStorageElement se : rootStorage.getChildren()) {
+				if (se.getName().equals(
+						CarbideBuildConfiguration.SBSV2_DATA_ID)) {
+					String value = se.getAttribute(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM);
+					if (value != null) {
+						platform = value;
+					}
+
+					value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT);
+					if (value != null) {
+						variant = value;
+					}
+
+					value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_CONFIG_TARGET);
+					if (value != null) {
+						target = value;
+					}
+
+					value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS);
+					if (value != null) {
+						buidAlias = value;
+					}
+
+					value = se.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_CONFIG_DISPLAY_STRING);
+					if (value != null) {
+						displayString = value;
+					}
+					
+					value = se
+					.getAttribute(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_SDK_ID);
+					if (value != null) {
+						sdkID = value;
+					}
+				}
+			}
+		} else {
+			return null;
+		}
+		
+		ISymbianSDK sdk = null;
+		if (sdkID == null){
+			// pre-C3 project, get SDK id from config name
+			if (displayString == null){
+				displayString = configID;
+			}
+			sdkID = BuildContextSBSv2.getSDKIDFromConfigName(displayString);
+		}
+		if (sdkID != null){
+			sdk = SDKCorePlugin.getSDKManager().getSDK(sdkID, true);
+			// TODO: NEED TO HANDLE MISSING SDK ID
+			if (sdk != null){
+				if (displayString == null || !displayString.startsWith(ISBSv2BuildContext.BUILDER_ID)) {
+					// likely an old config that has used the display name as the config id
+					displayString = configID;
+				}
+				
+				if (!configID.startsWith(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS)){
+					System.out.println("old config");
+				}
+				displayString = displayString + " [" + sdk.getUniqueId() + "]";
+				return new BuildContextSBSv2(sdk, platform, target, buidAlias, displayString, configID);
+			}
+		}
+		
+		return null;
+		
+	}
+
 	@Override
 	public void removeConfiguration(ICConfigurationDescription des,
 			CConfigurationData data, IProgressMonitor monitor) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java	Fri Jun 04 16:34:02 2010 -0500
@@ -17,6 +17,7 @@
 package com.nokia.carbide.cdt.internal.api.builder.ui;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 
@@ -250,7 +251,11 @@
 		boolean sbsv2Project = CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject());
 	
 		properSdkViewer.setContentProvider(filteringContentProviderWrapper);
-		properSdkViewer.setInput(BuildTargetTreeNode.getTreeViewerInput(sbsv2Project));
+		BuildTargetTreeNode[] sdkConfigTreeNodes = BuildTargetTreeNode.getTreeViewerInput(sbsv2Project);
+		if (sbsv2Project){
+			replaceFilteredConfigsFromProject(sdkConfigTreeNodes);
+		}
+		properSdkViewer.setInput(sdkConfigTreeNodes);
 		propagateSdkTree();
 		properSdkViewer.addCheckStateListener(new ICheckStateListener() {
 			public void checkStateChanged(CheckStateChangedEvent event) {
@@ -267,6 +272,88 @@
 	}
 
 	/**
+	 * When displaying build configs there may be configurations in the project that may not be displayed.
+	 * We add those back in so they reside in the checked tree viewer in case the user wants to remove them.
+	 * @param sdkConfigTreeNodes
+	 */
+	private void replaceFilteredConfigsFromProject(BuildTargetTreeNode[] sdkConfigTreeNodes) {
+		List<ICarbideBuildConfiguration> bldConfigs = cpi.getBuildConfigurations();
+		
+		/////////////
+		//////////// TODO TODO TODO
+		/////////// Refactor me. This is very inefficient code, just used for prototyping of adding in filtered out configs
+		////////////
+		
+		for (ICarbideBuildConfiguration config : bldConfigs){
+			boolean foundConfig = false;
+			// Add in configs that are only defined in the project and not the
+			// suggested filtered config cache
+			for (BuildTargetTreeNode sdkConfigNode : sdkConfigTreeNodes){
+				TreeNode[] configNodes = sdkConfigNode.getChildren();
+				for (TreeNode childConfig : configNodes){
+					if (childConfig == null){
+						continue;
+					}
+					if (childConfig.getValue() instanceof ISymbianBuildContext){
+						ISymbianBuildContext context = (ISymbianBuildContext)(childConfig.getValue());
+						if (config.getBuildContext().equals(context)){
+							foundConfig = true;
+							break;
+						}
+					} else {
+						System.out.println("Huh? Not an ISymbiabBuildContext : " + childConfig.getValue());
+					}
+				}
+				if (foundConfig) break;
+			}
+			
+			if (!foundConfig){
+				for (BuildTargetTreeNode sdkConfigNode : sdkConfigTreeNodes){
+					ISymbianSDK sdk = sdkConfigNode.getSymbianSDK();
+					if (sdk.getUniqueId().equals(config.getSDK().getUniqueId())){
+						// add the config
+						TreeNode[] oldConfigNodes = sdkConfigNode.getChildren();
+						TreeNode[] newConfigNodes = new TreeNode[oldConfigNodes.length + 1];
+						int index = 0;
+						for (TreeNode newConfigNode : oldConfigNodes){
+							if (newConfigNode == null){
+								continue;
+							}
+							if (newConfigNode.getValue() instanceof ISymbianBuildContext){
+								ISymbianBuildContext context = (ISymbianBuildContext)(newConfigNode.getValue());
+								newConfigNodes[index++] = new TreeNode(context) {
+									@Override
+									public String toString() {
+										ISymbianBuildContext context = (ISymbianBuildContext)getValue();
+										return context.getDisplayString();
+									}
+								};
+							}
+						}
+						
+						// add the missing config
+						newConfigNodes[index++] = new TreeNode(config.getBuildContext()) {
+							@Override
+							public String toString() {
+								ISymbianBuildContext context = (ISymbianBuildContext)getValue();
+								return context.getDisplayString();
+							}
+						};
+						
+						sdkConfigNode.setChildren(newConfigNodes);
+						
+					} else {
+						continue; // not the SDK we're looking for
+					}
+				}
+
+			}
+			
+		}
+		
+	}
+
+	/**
 	 * Create contents of the button bar
 	 * @param parent
 	 */
@@ -316,8 +403,14 @@
 								
 								if (buildContext instanceof ISBSv2BuildContext){
 									ISBSv2BuildContext v2Context = (ISBSv2BuildContext)buildContext;
+									ISBSv2BuildContext currV2Context = (ISBSv2BuildContext)currExistingConfig.getBuildContext();
 									// extra check to see if we're using SBSv2 and config display name is older SBSv1 style
-									if (v2Context.getSBSv2Alias().equals(((ISBSv2BuildContext)currExistingConfig.getBuildContext()).getSBSv2Alias()) &&
+									if (currV2Context.getConfigID().startsWith(ISBSv2BuildContext.BUILDER_ID)){
+										if (v2Context.getConfigID().equals(currV2Context.getConfigID())	){
+											checkIt = true;
+										}
+									}
+									else if (v2Context.getSBSv2Alias().equals(currV2Context.getSBSv2Alias()) &&
 										v2Context.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
 										v2Context.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
 										&& v2Context.getSBSv2Alias() != null && v2Context.getSBSv2Alias().split("_").length == 2){
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java	Fri Jun 04 16:34:02 2010 -0500
@@ -48,6 +48,8 @@
 import com.nokia.carbide.cdt.builder.EpocEngineHelper;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.cpp.internal.api.utils.core.TextUtils;
 
 /**
@@ -125,7 +127,13 @@
 
 	@Override
 	public String getId() {
-		return carbideBuildConfig.getDisplayString();
+		if (carbideBuildConfig.getBuildContext() instanceof ISBSv1BuildContext){
+			return carbideBuildConfig.getDisplayString();
+		} else if (carbideBuildConfig.getBuildContext() instanceof ISBSv2BuildContext) {
+			return ((ISBSv2BuildContext)carbideBuildConfig.getBuildContext()).getConfigID();
+		}
+	
+		return null;
 	}
 
 	@Override
@@ -277,7 +285,7 @@
 			
 			ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject());
 			if (projDes != null) {
-				ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
+				ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getConfigurationID());
 				if (configDes != null) {
 					String sourcesCacheValue = "";
 					for (ICSourceEntry src : sourceEntries) {
@@ -308,7 +316,7 @@
 		try {
 			ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project);
 			if (projDes != null) {
-				ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getDisplayString());
+				ICConfigurationDescription configDes = projDes.getConfigurationById(((CarbideBuildConfiguration)carbideBuildConfig).getConfigurationID());
 				if (configDes != null) {
 					ICStorageElement storage = configDes.getStorage(CONFIG_DATA_CACHE, false);
 					if (storage != null) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Fri Jun 04 16:34:02 2010 -0500
@@ -269,7 +269,8 @@
 		try {
 			ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(projectTracker.getProject());
 			if (projDes != null) {
-				ICConfigurationDescription configDes = projDes.getConfigurationById(getDisplayString());
+			
+				ICConfigurationDescription configDes = projDes.getConfigurationById(getConfigurationID());
 				if (configDes != null) {
 					// save the CDT project description.  this saves all configs but that's the
 					// only thing CDT allows at this point.
@@ -285,6 +286,18 @@
 		return false;
 	}
 	
+	/**
+	 * Get the unique ID for this build configuration.
+	 * For ABLD it is the display name, for SBSv2, it is the builder ID
+	 * @return
+	 */
+	public String getConfigurationID() {
+		if (context instanceof ISBSv2BuildContext){
+			return ((ISBSv2BuildContext) context).getConfigID();
+		}
+		return context.getDisplayString();
+	}
+
 	public List<ISISBuilderInfo> getSISBuilderInfoList() {
 		return sisBuilderInfoList;
 	}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java	Fri Jun 04 16:34:02 2010 -0500
@@ -16,22 +16,32 @@
 */
 package com.nokia.carbide.cdt.internal.builder;
 
+import java.util.ArrayList;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.ICStorageElement;
+import org.eclipse.cdt.core.settings.model.WriteAccessException;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
 import com.nokia.carbide.cdt.internal.api.builder.CarbideConfigurationDataProvider;
 import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContextDataCache;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.cpp.internal.api.utils.core.Logging;
 
-import org.eclipse.cdt.core.CCorePlugin;
-import org.eclipse.cdt.core.model.CoreModel;
-import org.eclipse.cdt.core.model.ICProject;
-import org.eclipse.cdt.core.settings.model.*;
-import org.eclipse.core.runtime.*;
-
-import java.util.ArrayList;
-
 public class CarbideProjectModifier extends CarbideProjectInfo implements ICarbideProjectModifier {
 
 	// need to make all changes to the same description and save it
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Fri Jun 04 16:34:02 2010 -0500
@@ -21,15 +21,17 @@
 	private String platform;
 	private String target;
 	private String sbsv2Alias;
-	ISymbianSDK sdk;
+	private ISymbianSDK sdk;
+	private String displayString;
+	private String configID;  // cconfiguration 'id' attribute from .cproject
 	
-	public BuildContextSBSv2(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias) {
-		sdk = theSDK;
-		platform = thePlatform.toUpperCase();
-		target = theTarget.toUpperCase();
-		sbsv2Alias = theSBSv2Alias;
-		
-		getDisplayString();
+	public BuildContextSBSv2(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias, String displayName, String configID) {
+		this.sdk = theSDK;
+		this.platform = thePlatform.toUpperCase();
+		this.target = theTarget.toUpperCase();
+		this.sbsv2Alias = theSBSv2Alias;
+		this.displayString = displayName;
+		this.configID = configID;
 	}
 
 	@Override
@@ -47,21 +49,27 @@
 		return target;
 	}
 
+	public String getConfigID(){
+		return configID;
+	}
+	
 	@Override
 	public String getDisplayString() {
-		// TODO We will need to cobble up proper display names
-		//return "(" + sbsv2Alias + ") " + "[" + sdk.getUniqueId() + "]" ;
+		
 		
-		// TODO: This is temporary to support the old configs where
-		// The display name and id were the same thing. Need to work on supporting both
-		// as we migrate the display name to the settings and use a truly unique ID for configs.
+		// TODO: Still need to decide on how to set display string
+		// and how it's used for legacy SBSv2 configs
+		if (displayString != null && !displayString.equals(configID)){
+			return displayString;
+		}
 		
-		  String EMULATOR_DISPLAY_TEXT = "Emulator"; //$NON-NLS-1$
-		  String PHONE_DISPLAY_TEXT = "Phone"; //$NON-NLS-1$
-		  String DEBUG_DISPLAY_TEXT = "Debug"; //$NON-NLS-1$
-		  String RELEASE_DISPLAY_TEXT = "Release"; //$NON-NLS-1$
-		  String SPACE_DISPLAY_TEXT = " "; //$NON-NLS-1$
-		  String SDK_NOT_INSTALLED = "SDK not installed"; //$NON-NLS-1$
+		// TODO: else fallback for old configs, we should convert
+		String EMULATOR_DISPLAY_TEXT = "Emulator"; //$NON-NLS-1$
+		String PHONE_DISPLAY_TEXT = "Phone"; //$NON-NLS-1$
+		String DEBUG_DISPLAY_TEXT = "Debug"; //$NON-NLS-1$
+		String RELEASE_DISPLAY_TEXT = "Release"; //$NON-NLS-1$
+		String SPACE_DISPLAY_TEXT = " "; //$NON-NLS-1$
+		String SDK_NOT_INSTALLED = "SDK not installed"; //$NON-NLS-1$
 		String displayString = null;
 		if (displayString == null) {
 			// in the form Emulation Debug (WINSCW) [S60_3rd_MR] or
@@ -86,6 +94,11 @@
 	}
 
 	@Override
+	public String toString() {
+		return getConfigID();
+	}
+
+	@Override
 	public String getDefaultDefFileDirectoryName(boolean isASSP) {
 		// TOOD: THIS IS ABLD STUFF. isASSP does not belong with Raptor
 		// TODO: How the ASSP option affects the path?
@@ -337,6 +350,9 @@
 				return false;
 		} else if (!target.equals(other.target)) {
 			return false;
+		} else if (!configID.equals(other.configID)){
+			// TODO: Do we really need anything other than a config ID comparison?
+			return false;
 		}
 		return true;
 	}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java	Fri Jun 04 16:34:02 2010 -0500
@@ -146,7 +146,7 @@
 	    	for (ISymbianSDK sdk : sdks) {
 	    		Version osVersion = sdk.getOSVersion();
 	    		if (osVersion.getMajor() > 8 ||
-	    				(osVersion.getMajor() == 8 && osVersion.getMinor() > 3)) {
+	    				(osVersion.getMajor() == 9 && osVersion.getMinor() > 3)) {
 	    			supportedSDKs.add(sdk);
 	    		}
 	    	}
@@ -238,7 +238,10 @@
 		    	
 		    	if (targetString != null) {
 		    		BuildContextSBSv2 context = null;
-		    		context = new BuildContextSBSv2(sdk, basePlat, targetString, alias);
+		    		// TODO: Display String not properly set
+		    		String configID = ISBSv2BuildContext.BUILDER_ID + "." + alias + "." + sdk.getUniqueId();
+		    		String displayString = alias + " [" + sdk.getUniqueId() + "]";
+		    		context = new BuildContextSBSv2(sdk, basePlat, targetString, alias, displayString, configID);
 		    		if (context != null) 
 		    			contexts.add(context);
 		    	}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java	Fri Jun 04 16:34:02 2010 -0500
@@ -1,6 +1,9 @@
 package com.nokia.carbide.cpp.sdk.core;
 
 public interface ISBSv2BuildContext extends ISymbianBuildContext {
+	
+	public static final String BUILDER_ID = "com.nokia.carbide.builder.raptor";
+	
 	/**
 	 * Retrieve the build-able configuration; a valid command that cab be passed with Raptor's -c parameter.
 	 * This should not be used and should return null for abld-configurations.
@@ -8,4 +11,10 @@
 	 */
 	public String getSBSv2Alias();
 	
+	/**
+	 * Get the unique configuration ID for the SBSv2 build configuration
+	 * @return
+	 */
+	public String getConfigID();
+	
 }
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetTreeNode.java	Thu Jun 03 17:43:59 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetTreeNode.java	Fri Jun 04 16:34:02 2010 -0500
@@ -126,9 +126,9 @@
 		
 		BuildTargetTreeNode[] input = new BuildTargetTreeNode[sdkListCopy.size()];
 		int index = 0;
-		for (Iterator<ISymbianSDK> iter = sdkListCopy.iterator(); iter.hasNext();) {
+		for (ISymbianSDK sdk : sdkListCopy) {
 			
-			BuildTargetTreeNode treeNode = new BuildTargetTreeNode(iter.next(), sbsv2Project);
+			BuildTargetTreeNode treeNode = new BuildTargetTreeNode(sdk, sbsv2Project);
 			if (treeNode.getChildren() != null){
 				input[index++] = treeNode;
 			}
@@ -144,4 +144,5 @@
 		}
 		return realInput;
 	}
+
 }