first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext. C3_BUILDER_WORK
authortimkelly
Tue, 01 Jun 2010 15:23:53 -0500
branchC3_BUILDER_WORK
changeset 1418 8ca7cf978139
parent 1417 8e6d57a444fc
child 1419 ab555eecf681
first pass refactoring ICarbideBuildConfiguration, removing implementation of ISymbianBuildContext.
builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultGNUMakefileViewConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultImageMakefileViewConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultIncludeFileLocator.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultMMPViewConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultViewConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java
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/BrokenConfigurationInProjectTreeNode.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/CarbideBuildConfiguration.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java
builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java
builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java
builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java
carbidesdk/com.nokia.carbide.cpp.sdk.examples/src/com/nokia/carbide/cpp/sdk/examples/jobs/ProjectReportJob.java
core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/CSScanner.java
core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SymbianContextTest.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.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/internal/api/sdk/SymbianBuildContext.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv1BuildContext.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java
project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView3.java
project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/MissingSdkTest.java
project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/TestBldInfImportDataLoader.java
project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ResourceChangeListener.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/AIFOutputFileParametersComposite.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContext.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContextBase.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/images/providers/ImageTableLabelProvider.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/LibrarySectionPart.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/ImporterScritpingUtils.java
project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/SymbianProject.java
qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QMakeEnvironmentModifier.java
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java	Tue Jun 01 15:23:53 2010 -0500
@@ -34,7 +34,7 @@
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
 import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
 import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.project.core.ProjectCorePlugin;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 
@@ -171,11 +171,11 @@
         ICarbideProjectModifier cpm = CarbideBuilderPlugin.getBuildManager().getProjectModifier(project);
 		assertEquals(1, cpm.getBuildConfigurations().size());
 		
-		ISymbianBuildContext context2 = SymbianBuildContext.getBuildContextFromDisplayName(stockBuildConfigs.get(1).getDisplayString());
+		ISymbianBuildContext context2 = BuildContextSBSv1.getBuildContextFromDisplayName(stockBuildConfigs.get(1).getDisplayString());
 		assertNotNull(context2);
 		cpm.createNewConfiguration(context2, true);
 
-		ISymbianBuildContext context3 = SymbianBuildContext.getBuildContextFromDisplayName(stockBuildConfigs.get(2).getDisplayString());
+		ISymbianBuildContext context3 = BuildContextSBSv1.getBuildContextFromDisplayName(stockBuildConfigs.get(2).getDisplayString());
 		assertNotNull(context3);
 		cpm.createNewConfiguration(context3, false);
 		
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultGNUMakefileViewConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultGNUMakefileViewConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -48,7 +48,7 @@
 	 * The build context may be null.
 	 */
 	public DefaultGNUMakefileViewConfiguration(ICarbideProjectInfo info, IViewFilter viewFilter) {
-		this(info.getProject(), info.getDefaultConfiguration(), viewFilter);
+		this(info.getProject(), info.getDefaultConfiguration().getBuildContext(), viewFilter);
 	}
 	
 	/**
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultImageMakefileViewConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultImageMakefileViewConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -40,7 +40,7 @@
 	 * The build context may not be null.
 	 */
 	public DefaultImageMakefileViewConfiguration(ICarbideProjectInfo info, IViewFilter viewFilter) {
-		super(info.getProject(), info.getDefaultConfiguration(), viewFilter);
+		super(info.getProject(), info.getDefaultConfiguration().getBuildContext(), viewFilter);
 	}
 	
 	/**
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultIncludeFileLocator.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultIncludeFileLocator.java	Tue Jun 01 15:23:53 2010 -0500
@@ -20,13 +20,14 @@
 package com.nokia.carbide.cdt.builder;
 
 import java.io.File;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.eclipse.core.resources.IProject;
 
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
-import com.nokia.carbide.cpp.sdk.core.*;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.BasicIncludeFileLocator;
 import com.nokia.cpp.internal.api.utils.core.Check;
 
@@ -52,9 +53,10 @@
 			}
 
 			// get info from context
-			Check.checkState(buildContext instanceof SymbianBuildContext);
+			// TODO: HACK HACK. Hard coded build context to get working....
+			Check.checkState(buildContext instanceof BuildContextSBSv1);
 			
-			systemPaths.addAll(((SymbianBuildContext) buildContext).getCachedSystemIncludePaths());
+			systemPaths.addAll(((BuildContextSBSv1) buildContext).getCachedSystemIncludePaths());
 		}
 		setPaths(null, (File[]) systemPaths.toArray(new File[systemPaths.size()]));
 	}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultMMPViewConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultMMPViewConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -30,7 +30,7 @@
 
 	/** Configuration for the default build configuration of the project */
 	public DefaultMMPViewConfiguration(ICarbideProjectInfo info, IViewFilter viewFilter) {
-		super(info.getProject(), info.getDefaultConfiguration(), viewFilter);
+		super(info.getProject(), info.getDefaultConfiguration().getBuildContext(), viewFilter);
 	}
 	/** Configuration for the given build configuration of the project with the given filter */
 	public DefaultMMPViewConfiguration(IProject project, ISymbianBuildContext context, IViewFilter viewFilter) {
@@ -49,7 +49,7 @@
 
 	/** Configuration for the given build configuration of the project with the given filter */
 	public DefaultMMPViewConfiguration(ICarbideBuildConfiguration buildConfiguration, IViewFilter viewFilter) {
-		super(buildConfiguration.getCarbideProject().getProject(), buildConfiguration, viewFilter);
+		super(buildConfiguration.getCarbideProject().getProject(), buildConfiguration.getBuildContext(), viewFilter);
 	}
 
 	/**
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultViewConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/DefaultViewConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -20,6 +20,7 @@
 import com.nokia.carbide.cpp.epoc.engine.model.IViewConfiguration;
 import com.nokia.carbide.cpp.epoc.engine.model.IViewParserConfiguration;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.cpp.internal.api.utils.core.Check;
 
@@ -43,7 +44,7 @@
 	public DefaultViewConfiguration(ICarbideProjectInfo projectInfo) {
 		Check.checkArg(projectInfo);
 		this.project = projectInfo.getProject();
-		this.context = projectInfo.getDefaultConfiguration();
+		this.context = projectInfo.getDefaultConfiguration().getBuildContext();
 		this.bldInfPath = null;
 		this.viewFilter = new AllNodesViewFilter();
 		wrapViewFilter();
@@ -199,7 +200,7 @@
 		List<IDefine> macros = new ArrayList<IDefine>();
 		if (context != null) {
 			
-			if (context.getSBSv2Alias() != null){
+			if (context instanceof ISBSv2BuildContext){
 				macros.add(DefineFactory.createDefine("SBSV2", null));
 			}
 			
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,36 +16,79 @@
 */
 package com.nokia.carbide.cdt.builder;
 
-import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
-import com.nokia.carbide.cdt.builder.project.*;
-import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
-import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
-import com.nokia.carbide.cpp.epoc.engine.*;
-import com.nokia.carbide.cpp.epoc.engine.image.*;
-import com.nokia.carbide.cpp.epoc.engine.model.bldinf.*;
-import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
-import com.nokia.carbide.cpp.epoc.engine.model.makefile.image.IImageMakefileData;
-import com.nokia.carbide.cpp.epoc.engine.model.mmp.*;
-import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
-import com.nokia.carbide.cpp.epoc.engine.preprocessor.AllNodesViewFilter;
-import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContextDataCache;
-import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.*;
-import com.nokia.cpp.internal.api.utils.core.*;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 
-import java.io.*;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
+import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
+import com.nokia.carbide.cpp.epoc.engine.BldInfDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.BldInfViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
+import com.nokia.carbide.cpp.epoc.engine.ImageMakefileDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.MMPViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.PKGViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.image.IBitmapSource;
+import com.nokia.carbide.cpp.epoc.engine.image.IImageSource;
+import com.nokia.carbide.cpp.epoc.engine.image.IMultiImageSource;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfData;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExport;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMMPReference;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakMakeReference;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakefileReference;
+import com.nokia.carbide.cpp.epoc.engine.model.makefile.image.IImageMakefileData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPAIFInfo;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPBitmap;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPView;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPViewConfiguration;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.AllNodesViewFilter;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContextDataCache;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.EPKGLanguage;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGEmbeddedSISFile;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGInstallFile;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGView;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.PKGModelHelper;
+import com.nokia.cpp.internal.api.utils.core.CommonPathFinder;
+import com.nokia.cpp.internal.api.utils.core.FileUtils;
+import com.nokia.cpp.internal.api.utils.core.Logging;
+import com.nokia.cpp.internal.api.utils.core.PathUtils;
+import com.nokia.cpp.internal.api.utils.core.TextUtils;
 
 public class EpocEngineHelper {
 
@@ -636,7 +679,7 @@
 		final Set<IPath> tempNormalProjects = new LinkedHashSet<IPath>();
 		for (final ICarbideBuildConfiguration buildConfig : buildConfigs) {
 			EpocEnginePlugin.runWithBldInfData(cpi.getWorkspaceRelativeBldInfPath(), 
-					new DefaultViewConfiguration(project, buildConfig, new AcceptedNodesViewFilter()), 
+					new DefaultViewConfiguration(project, buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 					new BldInfDataRunnableAdapter() {
 						public Object run(IBldInfData data) {
 							for (IMakMakeReference normalRef : data.getMakMakeReferences()) {
@@ -678,7 +721,7 @@
 		}
 		
 		exePath = (String)EpocEnginePlugin.runWithBldInfData(info.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new BldInfDataRunnableAdapter() {
 					public Object run(IBldInfData data) {
 						String exePath  = ""; //$NON-NLS-1$
@@ -688,7 +731,7 @@
 						if (mmps.length == 1) {
 							final IPath workspaceRelativeMMPPath = new Path(info.getProject().getName()).append(mmps[0].getPath());
 							exePath = (String)EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-									new DefaultMMPViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()),
+									new DefaultMMPViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
 									new MMPDataRunnableAdapter() {
 
 									public Object run(IMMPData mmpData) {
@@ -768,7 +811,7 @@
 		final ICarbideBuildConfiguration buildConfig = info.getDefaultConfiguration();
 		
 		exePath = (IPath)EpocEnginePlugin.runWithBldInfData(info.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new BldInfDataRunnableAdapter() {
 					public Object run(IBldInfData data) {
 						IPath exePath  = null;
@@ -778,7 +821,7 @@
 						if (mmps.length == 1) {
 							final IPath workspaceRelativeMMPPath = new Path(info.getProject().getName()).append(mmps[0].getPath());
 							exePath = (IPath)EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-									new DefaultMMPViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()),
+									new DefaultMMPViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
 									new MMPDataRunnableAdapter() {
 									public Object run(IMMPData mmpData) {
 										IPath exePath = null;
@@ -971,7 +1014,7 @@
 		final ICarbideBuildConfiguration buildConfig = info.getDefaultConfiguration();
 		
 		EpocEnginePlugin.runWithBldInfData(info.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new BldInfDataRunnableAdapter() {
 
 				public Object run(IBldInfData data) {
@@ -980,7 +1023,7 @@
 					if (mmps.length == 1) {
 						final IPath workspaceRelativeMMPPath = new Path(info.getProject().getName()).append(mmps[0].getPath());
 						EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-								new DefaultMMPViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()),
+								new DefaultMMPViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
 								new MMPDataRunnableAdapter() {
 
 								public Object run(IMMPData mmpData) {
@@ -1137,7 +1180,7 @@
 
 		final ICarbideProjectInfo cpi = buildConfig.getCarbideProject();
 		EpocEnginePlugin.runWithBldInfView(cpi.getWorkspaceRelativeBldInfPath(),
-				new DefaultViewConfiguration(cpi.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultViewConfiguration(cpi.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new BldInfViewRunnableAdapter() {
 
 					public Object run(IBldInfView view) {
@@ -1266,7 +1309,7 @@
 			
 			if (mmpName.toUpperCase().equals(mmpName2.toUpperCase())){
 				EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-						new DefaultMMPViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+						new DefaultMMPViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 						new MMPDataRunnableAdapter() {
 
 						public Object run(IMMPData mmpData) {
@@ -1615,7 +1658,7 @@
 		final IPath workspaceRelativeldInfPath = buildConfig.getCarbideProject().getWorkspaceRelativeBldInfPath();
 
 		EpocEnginePlugin.runWithBldInfData(workspaceRelativeldInfPath,
-			new DefaultViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+			new DefaultViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 			new BldInfDataRunnableAdapter() {
 
 				public Object run(IBldInfData data) {
@@ -1646,7 +1689,7 @@
 		final List<String> macros = new ArrayList<String>();
 		
 		EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new MMPDataRunnableAdapter() {
 
 				public Object run(IMMPData mmpData) {
@@ -1678,7 +1721,7 @@
 			IPath mmp, final ICarbideBuildConfiguration buildConfiguration,
 			final List<File> userPaths, final List<File> systemPaths) {
 		IMMPViewConfiguration viewConfiguration = new DefaultMMPViewConfiguration(
-				project, buildConfiguration, new AcceptedNodesViewFilter());
+				project, buildConfiguration.getBuildContext(), new AcceptedNodesViewFilter());
 		
 		final IPath epocRoot = new Path(buildConfiguration.getSDK().getEPOCROOT());
 		EpocEnginePlugin.runWithMMPData(new Path(project.getName()).append(mmp), 
@@ -1805,7 +1848,7 @@
 		final ICarbideBuildConfiguration buildConfig = info.getDefaultConfiguration();
 		final List<IPath>mmpPaths = new ArrayList<IPath>();
 		EpocEnginePlugin.runWithBldInfData(info.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new BldInfDataRunnableAdapter() {
 
 					public Object run(IBldInfData infView) {
@@ -1813,7 +1856,7 @@
 								final IPath workspaceRelativeMMPPath = new Path(info.getProject().getName()).append(mmp.getPath());
 								
 								EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-										new DefaultMMPViewConfiguration(info.getProject(), buildConfig, new AcceptedNodesViewFilter()),
+										new DefaultMMPViewConfiguration(info.getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()),
 										new MMPDataRunnableAdapter() {
 
 										public Object run(IMMPData mmpData) {
@@ -1913,7 +1956,7 @@
 		final ICarbideProjectInfo cpi = buildConfig.getCarbideProject();
 		
 		EpocEnginePlugin.runWithBldInfData(cpi.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(cpi, buildConfig), 
+				new DefaultViewConfiguration(cpi, buildConfig.getBuildContext()), 
 				new BldInfDataRunnableAdapter() {
 
 					public Object run(IBldInfData infView) {
@@ -1999,7 +2042,7 @@
 				continue;
 			
 			EpocEnginePlugin.runWithMMPData(mmpPath, 
-					new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData mmpData) {
@@ -2258,7 +2301,12 @@
 		mmpFile = mmpFile.removeFileExtension();
 		String mmpRootName = mmpFile.lastSegment();
 		String plat = config.getPlatformString();
-		String basePlat = config.getBasePlatformForVariation();
+		String basePlat = "";
+		if (config.getBuildContext() instanceof ISBSv2BuildConfigInfo){
+			basePlat = ((ISBSv1BuildContext)config).getBasePlatformForVariation();
+		} else {
+			basePlat = config.getPlatformString();
+		}
 		String variantPlat = config.getBuildVariationName();
 		
 		if (variantPlat.length() == 0){
@@ -2295,7 +2343,7 @@
 			}
 			
 			String searchString = "";
-			if (config.getTargetString().equals(SymbianBuildContext.DEBUG_TARGET)){
+			if (config.getTargetString().equals(BuildContextSBSv1.DEBUG_TARGET)){
 				searchString = "# FeatureVariantUDEBLabel";
 			} else {
 				searchString = "# FeatureVariantURELLabel";
@@ -2391,7 +2439,7 @@
 	 */
 	public static void addIncludedFilesFromBldInf(ICarbideProjectInfo projectInfo, ICarbideBuildConfiguration buildConfig, IPath bldinfPath, final Collection<IPath> pathList) {
 		DefaultViewConfiguration viewConfig = buildConfig != null ?
-				new DefaultViewConfiguration(projectInfo, buildConfig) :
+				new DefaultViewConfiguration(projectInfo, buildConfig.getBuildContext()) :
 					new DefaultViewConfiguration(projectInfo);
 		EpocEnginePlugin.runWithBldInfData(bldinfPath, 
 				viewConfig, 
@@ -2440,7 +2488,7 @@
 		final List<IPath> filePaths = new ArrayList<IPath>();
 		
 		PKGModelHelper.runWithPKGView(pkgPath, 
-				new DefaultViewConfiguration(buildConfig.getCarbideProject(), buildConfig), 
+				new DefaultViewConfiguration(buildConfig.getCarbideProject(), buildConfig.getBuildContext()), 
 				new PKGViewRunnableAdapter() {
 
 				public Object run(IPKGView view) {
@@ -2609,7 +2657,7 @@
 		final ICarbideProjectInfo cpi = buildConfig.getCarbideProject();
 		
 		EpocEnginePlugin.runWithBldInfData(cpi.getWorkspaceRelativeBldInfPath(), 
-				new DefaultViewConfiguration(cpi, buildConfig), 
+				new DefaultViewConfiguration(cpi, buildConfig.getBuildContext()), 
 				new BldInfDataRunnableAdapter() {
 
 					public Object run(IBldInfData infView) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/builder/CarbideCPPBuilder.java	Tue Jun 01 15:23:53 2010 -0500
@@ -80,6 +80,7 @@
 import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
 import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager;
 import com.nokia.carbide.cpp.internal.x86build.X86BuildPlugin;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.EPKGLanguage;
@@ -461,7 +462,7 @@
 		
 		ICarbideProjectInfo cpi = buildConfig.getCarbideProject();		
 		List<ISymbianBuildContext> buildConfigList = new ArrayList<ISymbianBuildContext>(1);
-		buildConfigList.add(buildConfig);
+		buildConfigList.add(buildConfig.getBuildContext());
 		
 		if (clearMarkers) {
     		try {
@@ -623,7 +624,7 @@
 		final List<IPath> rules = new ArrayList<IPath>();
 		
 		EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new MMPDataRunnableAdapter() {
 
 				public Object run(IMMPData mmpData) {
@@ -733,7 +734,7 @@
 
 		ICarbideProjectInfo cpi = buildConfig.getCarbideProject();		
 		List<ISymbianBuildContext> buildConfigList = new ArrayList<ISymbianBuildContext>(1);
-		buildConfigList.add(buildConfig);
+		buildConfigList.add(buildConfig.getBuildContext());
 
 		// get the list of mmp/make files for this build configuration
 		EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfigList, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
@@ -906,7 +907,9 @@
 			
 			List<String> argsList = new ArrayList<String>();
 			argsList.add("bldfiles");
-			argsList.add(config.getBasePlatformForVariation().toLowerCase());
+			if (config instanceof ISBSv1BuildContext){
+				argsList.add(((ISBSv1BuildContext)config).getBasePlatformForVariation().toLowerCase());
+			}
 			
 			for (String arg : config.getBuildArgumentsInfo().getBldmakeBldFilesArgs().split(" ")) {
 				argsList.add(arg);
@@ -1352,7 +1355,7 @@
 
 			IPath tmpPKGPath = buildDirPath.append(prefix + pkgPath.lastSegment());
 
-			IPath resolvedPKGPath = resolvePKGFile(pkgPath, config, tmpPKGPath);
+			IPath resolvedPKGPath = resolvePKGFile(pkgPath, config.getBuildContext(), tmpPKGPath);
 			
 			List<String> args = new ArrayList<String>();
 
@@ -1626,7 +1629,7 @@
 
 		// update the temp pkg file by setting the PU flag and removing any files that have not been modified
 		PKGModelHelper.runWithPKGView(tempPkgBuildTreePath,
-				new DefaultViewConfiguration(config.getCarbideProject(), config), 
+				new DefaultViewConfiguration(config.getCarbideProject(), config.getBuildContext()), 
 				new PKGViewRunnableAdapter() {
 
 				public Object run(IPKGView view) {
@@ -1710,7 +1713,7 @@
 				}
 		});
 
-		tempPkgBuildTreePath = resolvePKGFile(tempPkgBuildTreePath, config, tempPkgBuildTreePath);
+		tempPkgBuildTreePath = resolvePKGFile(tempPkgBuildTreePath, config.getBuildContext(), tempPkgBuildTreePath);
 
 		// create link to temp pkg file and mark it as derived.
 		IFile tempPkgFileLink = getTempPkgIFile(pkgPath, tempPkgBuildTreePath, config);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,12 +16,15 @@
 */
 package com.nokia.carbide.cdt.builder.project;
 
+import java.io.File;
 import java.util.List;
 
 import org.eclipse.core.runtime.IPath;
 
 import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 
 /**
  * An ICarbideBuildConfiguration interface represents on buildable target for a project. A single
@@ -29,7 +32,7 @@
  *
  * @noimplement This interface is not intended to be implemented by clients.
  */
-public interface ICarbideBuildConfiguration extends ISymbianBuildContext {
+public interface ICarbideBuildConfiguration {
 
 	/** Integer identifier for the set of parser to be used for building the WINSCW platform */
     public static final int ERROR_PARSERS_WINSCW = 1;
@@ -137,4 +140,33 @@
 	 */
 	IPath getTargetOutputDirectory();
 	
+	ISymbianBuildContext getBuildContext();
+	
+	/** ISymbianBuildContext wrapper */
+	String getDisplayString();
+	
+	/** ISymbianBuildContext wrapper */
+	ISymbianSDK getSDK();
+	
+	/** ISymbianBuildContext wrapper */
+	String getPlatformString();
+	
+	/** ISymbianBuildContext wrapper */
+	String getTargetString();
+	
+	/** TODO: Detect on instanceof ? */
+	public IPath getCompilerPrefixFile();
+	
+	/** TODO: Detect on instanceof ? */
+	public List<IDefine> getCompilerMacros();
+	
+	/** TODO: Detect on instanceof ? */
+	public List<IDefine> getVariantHRHDefines();
+	
+	/** TODO: Detect on instanceof ? */
+	public List<File> getPrefixFileIncludes();
+	
+	/** TODO: Detect on instanceof ? */
+	public String getBuildVariationName();
+	
 }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java	Tue Jun 01 15:23:53 2010 -0500
@@ -56,7 +56,8 @@
 import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.CarbideBuilderConfigInfoType;
 import com.nokia.carbide.cdt.internal.builder.gen.CarbideBuildConfig.ConfigurationType;
 import com.nokia.carbide.cdt.internal.builder.xml.CarbideBuildConfigurationLoader;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 
 /**
@@ -121,7 +122,9 @@
 			
 			// find the configuration that matches the id (sdk, platform, target)
 			String configId = des.getConfiguration().getId();
-			ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(configId);
+			// 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 = BuildContextSBSv1.getBuildContextFromDisplayName(configId);
 			if (context == null) {
 				throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "SDK specified in project " + project.getName() + " is not installed, please set it up from project property", null));
 			}
@@ -180,7 +183,8 @@
 			// as they are computed dynamically now.
 			for (Iterator i = buildConfigType.getConfiguration().iterator(); i.hasNext();) {
 				ConfigurationType currConfig = (ConfigurationType)i.next();
-				ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(currConfig.getName());
+				// TODO: YUKCY!
+				ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(currConfig.getName());
 				IEnvironmentVarsInfo envSettings = new EnvironmentVarsInfo(project, context, currConfig.getEnvVars());
 				List<IEnvironmentVariable> varsFromSettings = envSettings.getModifiedEnvVarsListFromSettings();
 				List<IEnvironmentVariable> updatedEnvList = new ArrayList<IEnvironmentVariable>();
@@ -304,8 +308,8 @@
 					List<ISymbianBuildContext> configs = new ArrayList<ISymbianBuildContext>();
 					for (Iterator i = oldConfigInfo.getConfiguration().iterator(); i.hasNext();) {
 						ConfigurationType currConfig = (ConfigurationType)i.next();
-						
-		    			ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(currConfig.getName());
+						// TODO: YUCKY!
+		    			ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(currConfig.getName());
 						if (context != null) {
 							configs.add(context);
 						}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/BrokenConfigurationInProjectTreeNode.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/BrokenConfigurationInProjectTreeNode.java	Tue Jun 01 15:23:53 2010 -0500
@@ -41,7 +41,7 @@
 		
 		for (ICarbideBuildConfiguration config : buildConfigList) {
 			if (config.getSDK().getUniqueId().equals(value.getUniqueId())) {
-				childConfig.add(config);
+				childConfig.add(config.getBuildContext());
 			}
 		}
 
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java	Tue Jun 01 15:23:53 2010 -0500
@@ -56,6 +56,7 @@
 import com.nokia.carbide.cpp.internal.qt.core.QtConfigFilter;
 import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
 import com.nokia.carbide.cpp.internal.qt.core.QtSDKFilter;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISDKManager;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -311,15 +312,18 @@
 							boolean checkIt = false;
 							checkIt = currExistingConfig.equals(buildContext);
 							if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()) &&
-											!checkIt && currExistingConfig.getSBSv2Alias() == null){
+											!checkIt){
 								
-								// extra check to see if we're using SBSv2 and config display name is older SBSv1 style
-								if (buildContext.getTargetString().equals(currExistingConfig.getTargetString()) &&
-									buildContext.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
-									buildContext.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
-									&& buildContext.getSBSv2Alias() != null && buildContext.getSBSv2Alias().split("_").length == 2){
-									
-									checkIt = true;
+								if (buildContext instanceof ISBSv2BuildContext){
+									ISBSv2BuildContext v2Context = (ISBSv2BuildContext)buildContext;
+									// extra check to see if we're using SBSv2 and config display name is older SBSv1 style
+									if (v2Context.getTargetString().equals(currExistingConfig.getTargetString()) &&
+										v2Context.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
+										v2Context.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
+										&& v2Context.getSBSv2Alias() != null && v2Context.getSBSv2Alias().split("_").length == 2){
+										
+										checkIt = true;
+									}
 								}
 							}
 							if (checkIt){
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,6 +16,7 @@
 */
 package com.nokia.carbide.cdt.internal.builder;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -44,14 +45,17 @@
 import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
 import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
 import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
 import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+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.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.cpp.internal.api.utils.core.TrackedResource;
 
-public class CarbideBuildConfiguration extends SymbianBuildContext implements ICarbideBuildConfiguration {
+public class CarbideBuildConfiguration implements ICarbideBuildConfiguration {
 	
 	static final String NOT_INSTALLED = "(SDK not found)"; //$NON-NLS-1$
 
@@ -64,6 +68,7 @@
 	// SBSv2 only config settings 
 	protected final static String SBSV2_DATA_ID = "SBSV2_DATA_ID"; //$NON-NLS-1$ 
 	
+	protected ISymbianBuildContext context;
 	protected TrackedResource projectTracker;
 	protected List<ISISBuilderInfo> sisBuilderInfoList;
 	protected EnvironmentVarsInfo2 envVarsInfo;
@@ -73,8 +78,16 @@
 	protected SBSv2BuilderInfo sbsv2BuilderInfo;
 	protected boolean rebuildNeeded;
 	
+	/**
+	 * TODO: Target constants - copied from ISymbianBuildContext 
+	 */
+
+	public static final String DEBUG_TARGET = "UDEB";
+
+	public static final String RELEASE_TARGET = "UREL";
+	
 	public CarbideBuildConfiguration(IProject project, ISymbianBuildContext context) {
-		super(context.getSDK(), context.getPlatformString(), context.getTargetString(), context.getSBSv2Alias());
+		this.context = context;
 		projectTracker = new TrackedResource(project);
 		sisBuilderInfoList = new ArrayList<ISISBuilderInfo>(0);
 		envVarsInfo = new EnvironmentVarsInfo2(project, context);
@@ -82,9 +95,10 @@
 		buildConfigData = new BuildConfigurationData(this);
 		romBuilderInfo = new ROMBuilderInfo(getSDK());
 		if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project)){
-			sbsv2BuilderInfo = new SBSv2BuilderInfo(context);
+			sbsv2BuilderInfo = new SBSv2BuilderInfo((ISBSv2BuildContext)context);
 		}
 		rebuildNeeded = true;
+		
 	}
 	
 	public void loadFromStorage(ICConfigurationDescription projDes) throws CoreException {
@@ -292,8 +306,10 @@
 	public int getErrorParserId(){
 		String plat = this.getPlatformString();
 		
-		if (this.getSBSv2Alias() != null && this.getSBSv2Alias().toUpperCase().contains(ISymbianBuildContext.GCCE_PLATFORM)){
-			return ERROR_PARSERS_GCCE;
+		if (context instanceof ISBSv2BuildContext){
+			if (((ISBSv2BuildContext)context).getSBSv2Alias().toUpperCase().contains(ISymbianBuildContext.GCCE_PLATFORM)){
+				return ERROR_PARSERS_GCCE;
+			}
 		}
 		
 		if (plat.equals(ISymbianBuildContext.EMULATOR_PLATFORM)){
@@ -358,7 +374,7 @@
 	public static String toMarkedConfig(String config) {
 		if (config == null)
 			return null;
-		if (SDKManagerInternalAPI.getMissingSdk(SymbianBuildContext.getSDKIDFromConfigName(config)) != null) {
+		if (SDKManagerInternalAPI.getMissingSdk(BuildContextSBSv1.getSDKIDFromConfigName(config)) != null) {
 			return badSdkString() + config;
 		}
 		return config;
@@ -401,7 +417,7 @@
 		List<ISymbianBuildContext> buildConfig = new ArrayList<ISymbianBuildContext>();
 		List<IPath> normalMakMakePaths = new ArrayList<IPath>();
 		List<IPath> testMakMakePaths = new ArrayList<IPath>();
-		buildConfig.add(this);
+		buildConfig.add(this.getBuildContext());
 		EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfig, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
 		
 		for (IPath mmpPath : normalMakMakePaths){
@@ -418,7 +434,11 @@
 	}
 
 	public IPath getTargetOutputDirectory() {
-		String releasePlatform = getSDK().getBSFCatalog().getReleasePlatform(getBasePlatformForVariation());
+		String releasePlatform = "";
+		if (context instanceof ISBSv1BuildContext){
+			ISBSv1BuildContext v1Context = (ISBSv1BuildContext)context;
+			releasePlatform = getSDK().getBSFCatalog().getReleasePlatform(v1Context.getBasePlatformForVariation());
+		}
 		if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(getCarbideProject().getProject())){
 			// Test is this is an SBSv2 build binary variant (changes the output directory)
 			ISBSv2BuildConfigInfo sbsv2Info = getSBSv2BuildConfigInfo();
@@ -436,5 +456,47 @@
 	public void setRebuildNeeded(boolean value) {
 		rebuildNeeded = value;
 	}
+
+	public ISymbianSDK getSDK() {
+		return context.getSDK();
+	}
+
+	public String getPlatformString() {
+		return context.getPlatformString();
+	}
+
+	public String getTargetString() {
+		return context.getTargetString();
+	}
+
+	public String getDisplayString() {
+		return context.getDisplayString();
+	}
+
+	public ISymbianBuildContext getBuildContext() {
+		return context;
+	}
+
+	public List<IDefine> getCompilerMacros() {
+		return context.getCompilerMacros();
+	}
+
+	public IPath getCompilerPrefixFile() {
+		return context.getCompilerPrefixFile();
+	}
+
+	public List<IDefine> getVariantHRHDefines() {
+		return context.getVariantHRHDefines();
+	}
+
+	public List<File> getPrefixFileIncludes() {
+		return context.getPrefixFileIncludes();
+	}
+
+	public String getBuildVariationName() {
+		return context.getBuildVariationName();
+	}
+	
+	
 	
 }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,35 +16,74 @@
 */
 package com.nokia.carbide.cdt.internal.builder;
 
-import java.io.*;
-import java.util.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
 
-import org.eclipse.cdt.make.core.makefile.*;
+import org.eclipse.cdt.make.core.makefile.ICommand;
+import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
+import org.eclipse.cdt.make.core.makefile.IRule;
+import org.eclipse.cdt.make.core.makefile.ITargetRule;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
-import org.eclipse.jface.dialogs.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
 
-import com.nokia.carbide.cdt.builder.*;
+import com.nokia.carbide.cdt.builder.BuilderPreferenceConstants;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.DefaultGNUMakefileViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultMMPViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultViewConfiguration;
+import com.nokia.carbide.cdt.builder.EpocEngineHelper;
+import com.nokia.carbide.cdt.builder.EpocEnginePathHelper;
 import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
 import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
-import com.nokia.carbide.cdt.builder.project.*;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
 import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog;
+import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog.MMPChangedAction;
 import com.nokia.carbide.cdt.internal.builder.ui.TrackDependenciesQueryDialog;
-import com.nokia.carbide.cdt.internal.builder.ui.MMPChangedActionDialog.MMPChangedAction;
-import com.nokia.carbide.cpp.epoc.engine.*;
+import com.nokia.carbide.cpp.epoc.engine.BldInfViewRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
+import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
 import com.nokia.carbide.cpp.epoc.engine.model.IModel;
 import com.nokia.carbide.cpp.epoc.engine.model.IModelProvider;
 import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView;
 import com.nokia.carbide.cpp.epoc.engine.model.makefile.IMakefileView;
-import com.nokia.carbide.cpp.epoc.engine.model.mmp.*;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
 import com.nokia.carbide.cpp.internal.qt.core.QtCorePlugin;
-import com.nokia.carbide.cpp.sdk.core.*;
+import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISBSv1BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.cpp.internal.api.utils.core.FileUtils;
 import com.nokia.cpp.internal.api.utils.core.HostOS;
 import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -126,8 +165,8 @@
 		if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
 				 EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
 			buildPlatform = buildConfig.getPlatformString().toLowerCase();
-		} else {
-			buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+		} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+			buildPlatform = ((ISBSv1BuildContext)buildConfig.getBuildContext()).getBasePlatformForVariation().toLowerCase();
 		}
 		
 		// need to run individual build steps when managing makefiles or doing concurrent builds
@@ -308,8 +347,8 @@
 		if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
 				 EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
 			buildPlatform = buildConfig.getPlatformString().toLowerCase();
-		} else {
-			buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+		} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+				buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 		}
 		
 		SubMonitor progress = SubMonitor.convert(monitor, 2);
@@ -371,8 +410,8 @@
 		if ( buildConfig.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
 				 EpocEngineHelper.hasFeatureVariantKeyword(buildConfig.getCarbideProject(), componentPath)){
 			buildPlatform = buildConfig.getPlatformString().toLowerCase();
-		} else {
-			buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+		} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+			buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 		}
 		
 		// run abld makefile platform for each component to be built if needed
@@ -425,7 +464,7 @@
 		}
 
 		List<ISymbianBuildContext> buildConfigList = new ArrayList<ISymbianBuildContext>(1);
-		buildConfigList.add(buildConfig);
+		buildConfigList.add(buildConfig.getBuildContext());
 
 		List<IPath> normalMakMakePaths = new ArrayList<IPath>();
 		List<IPath> testMakMakePaths = new ArrayList<IPath>();
@@ -597,7 +636,7 @@
 		final List<IPath> rules = new ArrayList<IPath>();
 		
 		EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig, new AcceptedNodesViewFilter()), 
+				new DefaultMMPViewConfiguration(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new MMPDataRunnableAdapter() {
 
 				public Object run(IMMPData mmpData) {
@@ -1128,8 +1167,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				List<String> argsList = new ArrayList<String>();
@@ -1160,8 +1199,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				List<String> argsList = new ArrayList<String>();
@@ -1255,8 +1294,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1287,8 +1326,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1320,8 +1359,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1351,8 +1390,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1405,8 +1444,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1438,8 +1477,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1473,7 +1512,7 @@
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
 				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1505,8 +1544,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				argsList.clear();
@@ -1674,8 +1713,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				List<String> argsList = new ArrayList<String>();
@@ -1849,8 +1888,8 @@
 					
 					buildPlatform = buildConfig.getPlatformString().toLowerCase();
 					
-				} else {
-					buildPlatform = buildConfig.getBasePlatformForVariation().toLowerCase();
+				} else if (buildConfig.getBuildContext() instanceof ISBSv1BuildContext) {
+					buildPlatform = ((ISBSv1BuildContext)buildConfig).getBasePlatformForVariation().toLowerCase();
 				}
 				
 				List<String> argsList = new ArrayList<String>();
@@ -2275,7 +2314,7 @@
 			// all make files exist.  now make sure the oldest of them is newer than the bld.inf or any of its includes
 			final long finalOldestMakefileTimestamp = oldestMakefileTimestamp;
 			Boolean regenerate = (Boolean)EpocEnginePlugin.runWithBldInfView(bldInfPath,
-					new DefaultViewConfiguration(config, bldInfPath, new AcceptedNodesViewFilter()), 
+					new DefaultViewConfiguration(config.getBuildContext(), bldInfPath, new AcceptedNodesViewFilter()), 
 					new BldInfViewRunnableAdapter() {
 						public Object run(IBldInfView view) {
 							for (IPath file : view.getReferencedFiles()) {
@@ -2328,8 +2367,8 @@
 			if ( config.getPlatformString().startsWith(ISymbianBuildContext.ARMV5_PLATFORM) &&
 					 EpocEngineHelper.hasFeatureVariantKeyword(config.getCarbideProject(), componentPath)){
 				buildPlatform = config.getPlatformString().toLowerCase();
-			} else {
-				buildPlatform = config.getBasePlatformForVariation().toLowerCase();
+			} else if (config.getBuildContext() instanceof ISBSv1BuildContext) {
+				buildPlatform = ((ISBSv1BuildContext)config).getBasePlatformForVariation().toLowerCase();
 			}
 			
 			abldArgs.add(MAKEFILE_CMD); //$NON-NLS-1$
@@ -2395,7 +2434,7 @@
 
 		// see if the makefile is newer than the mmp and all of its includes
 		Boolean regenerate = (Boolean)EpocEnginePlugin.runWithMMPData(componentPath,
-				new DefaultMMPViewConfiguration(cpi.getProject(), config, new AcceptedNodesViewFilter()), 
+				new DefaultMMPViewConfiguration(cpi.getProject(), config.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new MMPDataRunnableAdapter() {
 					public Object run(IMMPData data) {
 						for (IPath path : data.getReferencedFiles()) {
@@ -2478,7 +2517,7 @@
 
 		// see if the makefile is newer than the mmp and all of its includes
 		Boolean regenerate = (Boolean)EpocEnginePlugin.runWithMMPData(componentPath,
-				new DefaultMMPViewConfiguration(cpi.getProject(), config, new AcceptedNodesViewFilter()), 
+				new DefaultMMPViewConfiguration(cpi.getProject(), config.getBuildContext(), new AcceptedNodesViewFilter()), 
 				new MMPDataRunnableAdapter() {
 					public Object run(IMMPData data) {
 						for (IPath path : data.getReferencedFiles()) {
@@ -2547,11 +2586,11 @@
 		String platformName = "";
 		if (EpocEngineHelper.hasFeatureVariantKeyword(config.getCarbideProject(), componentPath)){
 			platformName = config.getPlatformString().toUpperCase();
-		} else {
-			platformName = config.getBasePlatformForVariation();
+		} else if (config.getBuildContext() instanceof ISBSv1BuildContext) {
+			platformName = ((ISBSv1BuildContext)config).getBasePlatformForVariation();
 		}
 		
-		makefilePath = makefilePath.append(config.getBasePlatformForVariation().toUpperCase());
+		makefilePath = makefilePath.append(((ISBSv1BuildContext)config).getBasePlatformForVariation().toUpperCase());
 
 		// and the makefile has the form MMPNAME.PLATFORM
 		makefilePath = makefilePath.append(mmpName + "." + platformName);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java	Tue Jun 01 15:23:53 2010 -0500
@@ -33,6 +33,7 @@
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 
 public class CarbideSBSv2Builder implements ICarbideBuilder {
 
@@ -88,7 +89,7 @@
     
     /** Get the build-able configuration from the command line (i.e. build alias). This is passed after the sbs -c parameter */
     protected String getConfigName(ICarbideBuildConfiguration buildConfig) {
-    	String buildAlias = buildConfig.getSBSv2Alias();
+    	String buildAlias = ((ISBSv2BuildContext)buildConfig).getSBSv2Alias();
     	if (buildAlias == null){ 
     		// Just get the default target. This is a SBSv1 style configuration name...
     		buildAlias = buildConfig.getPlatformString().toLowerCase() + "_" + buildConfig.getTargetString().toLowerCase();
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/SBSv2BuilderInfo.java	Tue Jun 01 15:23:53 2010 -0500
@@ -20,6 +20,7 @@
 
 import org.eclipse.cdt.core.settings.model.ICStorageElement;
 
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 
 public class SBSv2BuilderInfo implements ISBSv2BuildConfigInfo {
@@ -31,10 +32,10 @@
 	
 	ISymbianBuildContext context;
 	
-	public SBSv2BuilderInfo(ISymbianBuildContext context) {
+	public SBSv2BuilderInfo(ISBSv2BuildContext context) {
 		String buildAlias = context.getSBSv2Alias() != null ? context.getSBSv2Alias() : "";
 		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_BUILD_ALIAS, buildAlias);
-		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM, context.getBasePlatformForVariation());
+		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATRRIB_CONFIG_BASE_PLATFORM, context.getPlatformString());
 		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_CONFIG_TARGET, context.getTargetString());
 		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, context.getDisplayString());
 		sbsv2ConfigDataMap.put(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT, "");
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideBuildConfigurationsPage.java	Tue Jun 01 15:23:53 2010 -0500
@@ -1001,8 +1001,8 @@
 		sisFilesBlock.performDefaults();
 
 		IEnvironmentVarsInfo envVarsDefaults = cpi.getNamedConfiguration(lastSelectedConfigName).getEnvironmentVarsInfo();
-		String[] defaultVars = envVarsDefaults.getDefaultEnvVarsSettings(cpi, cpi.getNamedConfiguration(lastSelectedConfigName));
-		setUpEnvVarsTable(defaultVars, envVarsDefaults.getDefaultEnvVarsList(cpi, cpi.getNamedConfiguration(lastSelectedConfigName)));
+		String[] defaultVars = envVarsDefaults.getDefaultEnvVarsSettings(cpi, cpi.getNamedConfiguration(lastSelectedConfigName).getBuildContext());
+		setUpEnvVarsTable(defaultVars, envVarsDefaults.getDefaultEnvVarsList(cpi, cpi.getNamedConfiguration(lastSelectedConfigName).getBuildContext()));
 		
 		if (argumentsTabcomposite != null) {
 			argumentsTabcomposite.performDefaults(cpi.getNamedConfiguration(lastSelectedConfigName).getSDK());
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/CarbideCPPProjectSettingsPage.java	Tue Jun 01 15:23:53 2010 -0500
@@ -52,6 +52,7 @@
 import org.eclipse.ui.dialogs.PropertyPage;
 
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
 import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI;
 import com.nokia.carbide.cdt.internal.api.builder.ui.MMPSelectionUI.FileInfo;
@@ -355,7 +356,9 @@
 
     		// get the list of normal and test project extensions
     		List<ISymbianBuildContext> buildConfigList = new ArrayList<ISymbianBuildContext>();
-			buildConfigList.addAll(cpi.getBuildConfigurations());
+			for (ICarbideBuildConfiguration config : cpi.getBuildConfigurations()){
+				buildConfigList.add(config.getBuildContext());
+			}
 
     		enableOrDisableControls();
         }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java	Tue Jun 01 15:23:53 2010 -0500
@@ -116,7 +116,7 @@
 			String macrosFile = cpi.getMacrosFile();
 			if (macrosFile != null && macrosFile.length() > 0) {
 				MacroScanner scanner = new MacroScanner(
-						new DefaultIncludeFileLocator(buildConfig.getCarbideProject().getProject(), buildConfig),
+						new DefaultIncludeFileLocator(buildConfig.getCarbideProject().getProject(), buildConfig.getBuildContext()),
 						DefaultModelDocumentProvider.getInstance(), 
 						DefaultTranslationUnitProvider.getInstance());
 				scanner.scanFile(new File(macrosFile));
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/SBSv2BuildConfigTabComposite.java	Tue Jun 01 15:23:53 2010 -0500
@@ -34,6 +34,7 @@
 import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
 import com.nokia.carbide.cdt.internal.builder.ISBSv2BuildConfigInfo;
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 
 public class SBSv2BuildConfigTabComposite extends Composite {
@@ -46,6 +47,7 @@
 	Label configCmdLabel;
 	Label releaseTreeLabel;
 	private ICarbideBuildConfiguration config;
+	ISBSv2BuildContext context;
 	
 	public SBSv2BuildConfigTabComposite(TabItem tabItem) {
 		super(tabItem.getParent(), SWT.NONE);
@@ -88,6 +90,7 @@
 	
 	public void initData(ICarbideBuildConfiguration buildConfig) {
 		this.config = buildConfig;
+		context = (ISBSv2BuildContext)buildConfig;
 		ISBSv2BuildConfigInfo sbsv2ConfigInfo = ((CarbideBuildConfiguration)buildConfig).getSBSv2ConfigInfo();
 		if (sbsv2ConfigInfo != null && sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT) != null){
 			variantEdit.setText(sbsv2ConfigInfo.getSBSv2Setting(ISBSv2BuildConfigInfo.ATTRIB_SBSV2_VARIANT));
@@ -101,11 +104,11 @@
 	private void setVaraintDetailsText() {
 		
 		String configCmdText = configCmdLabelPrefixText;
-		if (config != null){
-			if (config.getSBSv2Alias() == null){
+		if (context != null){
+			if (context.getSBSv2Alias() == null){
 				configCmdText += config.getPlatformString().toLowerCase() + "_" + config.getTargetString().toLowerCase() + variantEdit.getText();
 			} else {
-				configCmdText += config.getSBSv2Alias() + variantEdit.getText();
+				configCmdText += context.getSBSv2Alias() + variantEdit.getText();
 			}
 		}
 		configCmdLabel.setText(configCmdText);
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/BuildPKGCommandHandler.java	Tue Jun 01 15:23:53 2010 -0500
@@ -48,7 +48,7 @@
 import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.builder.utils.Activator;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
@@ -153,7 +153,8 @@
 				bldMakeLauncher.showCommand(true);
 				String defaultConfigName = cpi.getDefaultBuildConfigName();
 				ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
-				ISymbianBuildContext context = SymbianBuildContext.getBuildContextFromDisplayName(defaultConfigName);
+				// TODO: YUCKY!!!
+				ISymbianBuildContext context = BuildContextSBSv1.getBuildContextFromDisplayName(defaultConfigName);
 				
 				bldMakeLauncher.startTimingStats();
 				
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java	Tue Jun 01 15:23:53 2010 -0500
@@ -429,7 +429,7 @@
 			
 			// target type macro (e.g. __DLL__)
 			EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, 
-					new DefaultMMPViewConfiguration(project, buildConfig, new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, buildConfig.getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData mmpData) {
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java	Fri May 28 16:01:18 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/ProjectCommandHandler.java	Tue Jun 01 15:23:53 2010 -0500
@@ -221,7 +221,7 @@
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
 		
 		final ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
-		Job buildJob = new Job("Freezing Configuration - " + defaultConfig.getDisplayString()) {
+		Job buildJob = new Job("Freezing Configuration - " + defaultConfig.getBuildContext().getDisplayString()) {
 			protected IStatus run(IProgressMonitor monitor) {
 				CarbideCPPBuilder.invokeFreeze(defaultConfig, monitor, true);
 				Activator.refreshProjectAfterFreeze(project);
--- a/carbidesdk/com.nokia.carbide.cpp.sdk.examples/src/com/nokia/carbide/cpp/sdk/examples/jobs/ProjectReportJob.java	Fri May 28 16:01:18 2010 -0500
+++ b/carbidesdk/com.nokia.carbide.cpp.sdk.examples/src/com/nokia/carbide/cpp/sdk/examples/jobs/ProjectReportJob.java	Tue Jun 01 15:23:53 2010 -0500
@@ -310,7 +310,7 @@
 					emitPara(infPath.toString(), null);
 					IResource resource = project.findMember(infPath);
 					IPath bldInfPath = resource.getFullPath();
-					IViewConfiguration viewConfig = new DefaultViewConfiguration(info, buildConfiguration);
+					IViewConfiguration viewConfig = new DefaultViewConfiguration(info, buildConfiguration.getBuildContext());
 				
 					EpocEnginePlugin.runWithBldInfView(bldInfPath, viewConfig, this);
 					worked(1);
@@ -394,7 +394,7 @@
 			IResource mmpResource = project.findMember(mmpPath);
 			if (mmpResource != null ) {
 				IMMPViewConfiguration viewConfig = new DefaultMMPViewConfiguration(project, 
-						buildConfiguration, new AcceptedNodesViewFilter());
+						buildConfiguration.getBuildContext(), new AcceptedNodesViewFilter());
 				EpocEnginePlugin.runWithMMPView(mmpResource.getFullPath(), viewConfig, this);
 			} else {
 				emitPara(mmpPath.toString() + " not found.", null);
--- a/core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/CSScanner.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/CSScanner.java	Tue Jun 01 15:23:53 2010 -0500
@@ -274,7 +274,7 @@
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
 		if (cpi != null) {
 			ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
-			IMMPViewConfiguration viewConfiguration = new DefaultMMPViewConfiguration(project, buildConfig, new AcceptedNodesViewFilter());
+			IMMPViewConfiguration viewConfiguration = new DefaultMMPViewConfiguration(project, buildConfig.getBuildContext(), new AcceptedNodesViewFilter());
 			EpocEnginePathHelper helper = new EpocEnginePathHelper(cpi.getProject());
 			IPath workspaceRelativeMMPPath = helper.convertToWorkspace(inMMPPath);
 			final String epocRoot = buildConfig.getSDK().getEPOCROOT();
@@ -312,7 +312,7 @@
 		ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
 		if (cpi != null) {
 			ICarbideBuildConfiguration buildConfig = cpi.getDefaultConfiguration();
-			IMMPViewConfiguration viewConfiguration = new DefaultMMPViewConfiguration(project, buildConfig, new AcceptedNodesViewFilter());
+			IMMPViewConfiguration viewConfiguration = new DefaultMMPViewConfiguration(project, buildConfig.getBuildContext(), new AcceptedNodesViewFilter());
 			final EpocEnginePathHelper pathHelper = new EpocEnginePathHelper(cpi.getProject());
 			IPath workspaceRelativeMMPPath = pathHelper.convertToWorkspace(inMMPPath);
 			final String epocRoot = buildConfig.getSDK().getEPOCROOT();
--- a/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SymbianContextTest.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SymbianContextTest.java	Tue Jun 01 15:23:53 2010 -0500
@@ -18,14 +18,14 @@
 
 import java.util.List;
 
+import junit.framework.TestCase;
+
 import org.osgi.framework.Version;
 
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 
-import junit.framework.TestCase;
-
 /**
  * This test the creation and APIs of the Symbian build context class.
  * Much of this functionality is covered by com.nokia.carbide.cpp.build plugin
@@ -70,7 +70,7 @@
 			assertEquals(4,osVer.getMinor());
 		}
 		
-		SymbianBuildContext context = new SymbianBuildContext(sdk, "WINSCW", "UDEB");
+		BuildContextSBSv1 context = new BuildContextSBSv1(sdk, "WINSCW", "UDEB");
 		ISymbianSDK contextSDK = context.getSDK();
 		
 		assertEquals(sdk, contextSDK);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.java	Tue Jun 01 15:23:53 2010 -0500
@@ -0,0 +1,393 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+*/
+package com.nokia.carbide.cpp.internal.api.sdk;
+
+import java.io.File;
+import java.util.*;
+
+import org.eclipse.core.runtime.IPath;
+import org.osgi.framework.Version;
+
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
+import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianMissingSDKFactory;
+import com.nokia.carbide.cpp.sdk.core.*;
+
+public class BuildContextSBSv1 implements ISBSv1BuildContext {
+
+	private String sdkId;
+	private String platform;
+	private String target;
+	private String displayString = null;
+	
+	private static String EMULATOR_DISPLAY_TEXT = "Emulator"; //$NON-NLS-1$
+	private static String PHONE_DISPLAY_TEXT = "Phone"; //$NON-NLS-1$
+	private static String DEBUG_DISPLAY_TEXT = "Debug"; //$NON-NLS-1$
+	private static String RELEASE_DISPLAY_TEXT = "Release"; //$NON-NLS-1$
+	private static String SPACE_DISPLAY_TEXT = " "; //$NON-NLS-1$
+	private static String SDK_NOT_INSTALLED = "SDK not installed"; //$NON-NLS-1$
+	
+	// a copy of bad SDK default to fall back
+	private static ISymbianSDK fallbackForBadSdk = SymbianMissingSDKFactory.createInstance("dummy_ID"); //$NON-NLS-1$
+	
+	public BuildContextSBSv1(ISymbianSDK theSDK, String thePlatform, String theTarget) {
+		sdkId = theSDK.getUniqueId();
+		platform = thePlatform.toUpperCase();
+		target = theTarget.toUpperCase();
+		
+		getDisplayString();
+	}
+	
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((platform == null) ? 0 : platform.hashCode());
+		result = prime * result + ((getSDK() == null) ? 0 : getSDK().getEPOCROOT().hashCode());
+		result = prime * result + ((target == null) ? 0 : target.hashCode());
+		return result;
+	}
+
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (!(obj instanceof BuildContextSBSv1))
+			return false;
+		final BuildContextSBSv1 other = (BuildContextSBSv1) obj;
+		if (platform == null) {
+			if (other.platform != null)
+				return false;
+		} else if (!platform.equals(other.platform))
+			return false;
+		if (getSDK() == null) {
+			if (other.getSDK() != null)
+				return false;
+		} else if (!getSDK().getEPOCROOT().equals(other.getSDK().getEPOCROOT()))
+			return false;
+		if (target == null) {
+			if (other.target != null)
+				return false;
+		} else if (!target.equals(other.target)) {
+			return false;
+		}
+		return true;
+	}
+
+
+	public ISymbianSDK getSDK() {
+		
+		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(sdkId, true);
+		if (sdk == null){
+			sdk = fallbackForBadSdk;
+		}
+		
+		return sdk;
+	}
+
+	public String getPlatformString() {
+		return platform.toUpperCase();
+	}
+
+	public String getTargetString() {
+		return target.toUpperCase();
+	}
+
+	public String getDisplayString() {
+		if (displayString == null) {
+			// in the form Emulation Debug (WINSCW) [S60_3rd_MR] or
+			// Phone Release (GCCE) [S60_3rd_MR]
+			if (platform.compareTo(ISymbianBuildContext.EMULATOR_PLATFORM) == 0) {
+				displayString = EMULATOR_DISPLAY_TEXT;
+			} else {
+				displayString = PHONE_DISPLAY_TEXT;
+			}
+			
+			if (target.compareTo(ISymbianBuildContext.DEBUG_TARGET) == 0) {
+				displayString = displayString + SPACE_DISPLAY_TEXT + DEBUG_DISPLAY_TEXT;
+			} else {
+				displayString = displayString + SPACE_DISPLAY_TEXT + RELEASE_DISPLAY_TEXT;
+			}
+			
+			String basePlatform = platform;
+			
+			displayString = displayString + " (" + basePlatform + ") [" + getSDK().getUniqueId() + "]"; //$NON-NLS-1$
+		}
+		return displayString;
+	}
+	
+	public static ISymbianBuildContext getBuildContextFromDisplayName(String displayName) {
+		if (isValidConfigName(displayName)) {
+			String sdkId = getSDKIDFromConfigName(displayName);
+			ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(sdkId, true);
+			if (sdk == null) {
+				// add a dummy should a build context ask for a removed SDK
+				sdk = SDKManagerInternalAPI.addMissingSdk(sdkId);
+			}
+						
+			return new BuildContextSBSv1(sdk, 
+						getPlatformFromBuildConfigName(displayName), 
+						getTargetFromBuildConfigName(displayName));
+		}
+		return new BuildContextSBSv1(fallbackForBadSdk, SDK_NOT_INSTALLED, SDK_NOT_INSTALLED);
+	}
+
+	private static String getPlatformFromBuildConfigName(String configName) {
+		String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
+		String sdkIdToken = tokens[2];
+		if (sdkIdToken.contains("_")){
+			sdkIdToken = sdkIdToken.substring(1, sdkIdToken.length()-1);
+			String[] aliasTokens = sdkIdToken.split("_");
+			return aliasTokens[0];
+		} else {
+			return sdkIdToken.substring(1, sdkIdToken.length()-1);
+		}
+		
+	}
+
+	public static String getSDKIDFromConfigName(String configName) {
+		int indexBegin = configName.indexOf("[");  //$NON-NLS-1$
+		int indexEnd = configName.indexOf("]");  //$NON-NLS-1$
+		if (indexBegin > 0 && indexEnd > 0){
+			return configName.substring(indexBegin+1, indexEnd);
+		} else {
+			return ""; //$NON-NLS-1$
+		}
+	}
+
+	private static String getTargetFromBuildConfigName(String configName) {
+		String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
+		if (tokens[1].compareTo(DEBUG_DISPLAY_TEXT) == 0) {
+			return ISymbianBuildContext.DEBUG_TARGET;
+		} else {
+			return ISymbianBuildContext.RELEASE_TARGET;
+		}
+	}
+
+	private static boolean isValidConfigName(String configName) {
+		// <Phone | Emulator> <Target> (<Platform>) [<SDK ID>]
+		if (configName != null && !configName.equals("")) { //$NON-NLS-1$
+			String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
+			if (tokens.length >= 4) {
+				if (tokens[0].compareTo(EMULATOR_DISPLAY_TEXT) == 0 || tokens[0].compareTo(PHONE_DISPLAY_TEXT) == 0) {
+					if (tokens[1].compareTo(DEBUG_DISPLAY_TEXT) == 0 || tokens[1].compareTo(RELEASE_DISPLAY_TEXT) == 0) {
+						if (tokens[2].matches("(.*)")) { //$NON-NLS-1$
+							if (tokens[3].matches("\\[.*")) { //$NON-NLS-1$
+								return true;
+							}
+						}
+					}
+				}
+			}
+		}
+		return false;
+	}
+	
+	public String toString() {
+		return getDisplayString();
+	}
+	
+	public String getDefaultDefFileDirectoryName(boolean isASSP) {
+		// TODO: How the ASSP option affects the path?
+
+		String dirName = getDefFileDirectoryNameForPlatform(platform);
+		if (dirName == null) {
+			// check BSF's
+			IBSFCatalog catalog = getSDK().getBSFCatalog();
+	    	if (catalog != null) {
+	    		for (IBSFPlatform plat : catalog.getPlatforms()) {
+	    			if (plat.getName().compareToIgnoreCase(platform) == 0) {
+	    				String mainPlatform = catalog.getReleasePlatform(platform);
+	    				if (mainPlatform != null) {
+	    					dirName = getDefFileDirectoryNameForPlatform(mainPlatform);
+	    					if (dirName == null || dirName.length() < 1) {
+	    						// fallback - all BSF's should be EABI anyway
+			    				return "EABI"; //$NON-NLS-1$
+	    					}
+	    				}
+	    			}
+	    		}
+	    	}
+		}
+		
+		if (dirName == null) {
+			// fallback for unknown cases
+			dirName = platform;
+		}
+		
+		return dirName;
+	}
+	
+	private String getDefFileDirectoryNameForPlatform(String platform) {
+		if (platform.equals(EMULATOR_PLATFORM)) {
+			return "BWINS"; //$NON-NLS-1$
+		} else if (platform.equals(ARMV5_PLATFORM)
+					|| platform.equals(ARMV5_ABIV2_PLATFORM)
+					|| platform.equals(ARMV6_PLATFORM)
+					|| platform.equals(ARMV6_ABIV2_PLATFORM)
+					|| platform.equals(GCCE_PLATFORM)) {
+			return "EABI"; //$NON-NLS-1$
+		}
+		return null;
+	}
+
+	public IPath getCompilerPrefixFile() {
+		if (platform.equals(GCCE_PLATFORM)) {
+			return getGCCEPrefixFilePath();
+		} else if (platform.equals(ARMV5_PLATFORM)
+					|| platform.equals(ARMV5_ABIV2_PLATFORM)
+					|| platform.equals(ARMV6_PLATFORM)
+					|| platform.equals(ARMV6_ABIV2_PLATFORM)) {
+			return getRVCTPrefixFilePath();
+		} else {
+			// check BSF's
+			IBSFCatalog catalog = getSDK().getBSFCatalog();
+	    	if (catalog != null) {
+	    		for (IBSFPlatform plat : catalog.getPlatforms()) {
+	    			if (plat.getName().compareToIgnoreCase(platform) == 0) {
+	    				String mainPlatform = catalog.getReleasePlatform(platform);
+	    				if (mainPlatform != null) {
+	    					if (mainPlatform.equals(GCCE_PLATFORM)) {
+	    						return getGCCEPrefixFilePath();
+	    					} else if (mainPlatform.equals(ARMV5_PLATFORM) 
+	    								|| mainPlatform.equals(ARMV5_ABIV2_PLATFORM)
+	    								|| mainPlatform.equals(ARMV6_PLATFORM)
+	    								|| mainPlatform.equals(ARMV6_ABIV2_PLATFORM)) {
+	    						return getRVCTPrefixFilePath();
+	    					} else {
+	    						// fallback - all BSF's should be EABI anyway
+	    						return getRVCTPrefixFilePath();
+	    					}
+	    				}
+	    			}
+	    		}
+	    	}
+		}
+
+		// fallback for WINSCW, MSVC, etc.
+		return null;
+	}
+
+	private IPath getGCCEPrefixFilePath() {
+		return getSDK().getIncludePath().append("gcce/gcce.h"); //$NON-NLS-1$
+	}
+
+	private IPath getRVCTPrefixFilePath() {
+		IRVCTToolChainInfo[] installedRVCTTools = SDKCorePlugin.getSDKManager().getInstalledRVCTTools();
+		// use default in case tools aren't installed
+		String rvctFragment = "rvct2_2"; //$NON-NLS-1$
+		if (installedRVCTTools.length > 0) {
+			rvctFragment = getRVCTFragment(installedRVCTTools[0]);
+		}
+		IPath prefixFilePath = getSDK().getIncludePath().append(rvctFragment).append(rvctFragment + ".h"); //$NON-NLS-1$
+		if (prefixFilePath.toFile().exists()){
+			return prefixFilePath;
+		} else {
+			// SF kits around SF^3 started to only use a single rvct.h header instead of specific versioned ones
+			// based on the default installation
+			return getSDK().getIncludePath().append("rvct").append("rvct" + ".h");
+		}
+	}
+
+	private String getRVCTFragment(IRVCTToolChainInfo info) {
+		int major = 0, minor = 0;
+		if (info != null) {
+			Version rvctToolsVersion = info.getRvctToolsVersion();
+			if (rvctToolsVersion != null) {
+				major = info.getRvctToolsVersion().getMajor();
+				minor = info.getRvctToolsVersion().getMinor();
+			}
+		}
+		return "rvct" + major + "_" + minor; //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public List<IDefine> getVariantHRHDefines() {
+
+		return getCachedData().getVariantHRHDefines();
+	}
+
+	public List<File> getPrefixFileIncludes() {
+		return getCachedData().getPrefixFileIncludes();
+	}
+
+
+	public List<IDefine> getCompilerMacros() {
+		// we parse the compiler prefix file to gather macros.  this can be time consuming so do it
+		// once and cache the values.  only reset the cache when the compiler prefix has changed.
+		
+		IPath prefixFile = getCompilerPrefixFile();
+		if (prefixFile == null) {
+			return Collections.emptyList();
+		}
+		
+		return getCachedData().getCompilerMacros(prefixFile);
+	}
+
+
+	public String getBuildVariationName() {
+		String varName = "";
+		
+		String[] tokens = getPlatformString().split("\\.");
+		if (tokens.length == 2){
+			varName = tokens[1];
+		}
+		
+		return varName;
+	}
+
+
+	public boolean isSymbianBinaryVariation() {
+		if (getPlatformString().split("\\.").length == 2){
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	/**
+	 * Get the cache holding the data that applies to this build context globally.
+	 * A build context is subclassed by CarbideBuildConfiguration, which has multiple
+	 * instances at runtime, thus, a SymbianBuildContext instance should not hold a cache itself.
+	 * @return cache, never <code>null</code>
+	 */
+	private SymbianBuildContextDataCache getCachedData() {
+		return SymbianBuildContextDataCache.getCache(this);
+	}
+	
+
+	public String getBasePlatformForVariation() {
+		String plat = "";
+		
+		String[] tokens = getPlatformString().split("\\.");
+		if (tokens.length == 2){
+			plat = tokens[0];
+		} else {
+			return platform;
+		}
+		
+		return plat;
+	}
+
+
+	/**
+	 * Get the list of #include paths detected for this context.
+	 * @return List or <code>null</code>
+	 */
+	public List<File> getCachedSystemIncludePaths() {
+		return getCachedData().getSystemIncludePaths();
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java	Tue Jun 01 15:23:53 2010 -0500
@@ -0,0 +1,116 @@
+package com.nokia.carbide.cpp.internal.api.sdk;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+
+public class BuildContextSBSv2 implements ISBSv2BuildContext {
+	
+	private String platform;
+	private String target;
+	private String sbsv2Alias;
+	ISymbianSDK sdk;
+	
+	public BuildContextSBSv2(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias) {
+		sdk = theSDK;
+		platform = thePlatform.toUpperCase();
+		target = theTarget.toUpperCase();
+		sbsv2Alias = theSBSv2Alias;
+		
+		getDisplayString();
+	}
+
+	@Override
+	public ISymbianSDK getSDK() {
+		return sdk;
+	}
+
+	@Override
+	public String getPlatformString() {
+		return platform;
+	}
+
+	@Override
+	public String getTargetString() {
+		return target;
+	}
+
+	@Override
+	public String getDisplayString() {
+		// TODO Auto-generated method stub
+		return sbsv2Alias;
+	}
+
+	@Override
+	public String getDefaultDefFileDirectoryName(boolean isASSP) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public IPath getCompilerPrefixFile() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<IDefine> getVariantHRHDefines() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<File> getPrefixFileIncludes() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public List<IDefine> getCompilerMacros() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public String getBuildVariationName() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public boolean isSymbianBinaryVariation() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+	
+	/**
+	 * See if the build configuration is an SBSv2 alias, and if so get the build-able alias name 
+	 * @param displayName
+	 * @return The full SBSv2 alias that can be used with -c, otherwise null if not SBSv2
+	 */
+	private static String getSBSv2AliasFromConfigName(String displayName) {
+		int indexBegin = displayName.indexOf("(");  //$NON-NLS-1$
+		int indexEnd = displayName.indexOf(")");  //$NON-NLS-1$
+		if (indexBegin > 0 && indexEnd > 0){
+			String configPart =  displayName.substring(indexBegin+1, indexEnd);
+			if (configPart.split("_").length > 1){
+				return configPart;
+			}
+		} 
+		
+		return null;
+	}
+
+	@Override
+	public String getSBSv2Alias() {
+		return sbsv2Alias;
+	}
+
+	
+
+}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SBSv2Utils.java	Tue Jun 01 15:23:53 2010 -0500
@@ -40,6 +40,7 @@
 import org.xml.sax.InputSource;
 import org.xml.sax.helpers.DefaultHandler;
 
+import com.nokia.carbide.cpp.sdk.core.ISBSv2BuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISDKManager;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -236,8 +237,8 @@
 		    	}
 		    	
 		    	if (targetString != null) {
-		    		SymbianBuildContext context = null;
-		    		context = new SymbianBuildContext(sdk, basePlat, targetString, alias);
+		    		BuildContextSBSv2 context = null;
+		    		context = new BuildContextSBSv2(sdk, basePlat, targetString, alias);
 		    		if (context != null) 
 		    			contexts.add(context);
 		    	}
@@ -409,11 +410,18 @@
 
 			// First sort the target name (Debug / Release) and push Emulation to the top
 			public int compare(ISymbianBuildContext o1, ISymbianBuildContext o2) {
-				String sbsAlias1 = o1.getSBSv2Alias();
-				String sbsAlias2 = o2.getSBSv2Alias();
-				
+				ISBSv2BuildContext sbsv2Context1 = null;
+				ISBSv2BuildContext sbsv2Context2 = null;
+				String sbsAlias1 = "";
+				String sbsAlias2 = "";
+				if (o1 instanceof ISBSv2BuildContext && o2 instanceof ISBSv2BuildContext){
+					sbsv2Context1 = ((ISBSv2BuildContext)o1);
+					sbsv2Context2 = ((ISBSv2BuildContext)o2);
+					sbsAlias1 = sbsv2Context1.getSBSv2Alias();
+					sbsAlias2 = sbsv2Context2.getSBSv2Alias();
+				}
 				if (o1.getPlatformString().equals(o2.getPlatformString())) {
-					if (o1.getSBSv2Alias().split("_").length != o2.getSBSv2Alias().split("_").length)
+					if (sbsv2Context1.getSBSv2Alias().split("_").length != sbsv2Context1.getSBSv2Alias().split("_").length)
 						return o1.getTargetString().compareTo(o2.getTargetString());
 					else if (sbsAlias1.split("_").length >= 3){
 						String temp1[] = sbsAlias1.split("_");
@@ -446,10 +454,18 @@
 		Collections.sort(contexts, new Comparator<ISymbianBuildContext>() {
 
 			public int compare(ISymbianBuildContext o1, ISymbianBuildContext o2) {
-				String sbsAlias1 = o1.getSBSv2Alias();
-				String sbsAlias2 = o2.getSBSv2Alias();
+				ISBSv2BuildContext sbsv2Context1 = null;
+				ISBSv2BuildContext sbsv2Context2 = null;
+				String sbsAlias1 = "";
+				String sbsAlias2 = "";
+				if (o1 instanceof ISBSv2BuildContext && o2 instanceof ISBSv2BuildContext){
+					sbsv2Context1 = ((ISBSv2BuildContext)o1);
+					sbsv2Context2 = ((ISBSv2BuildContext)o2);
+					sbsAlias1 = sbsv2Context1.getSBSv2Alias();
+					sbsAlias2 = sbsv2Context2.getSBSv2Alias();
+				}
 				
-				if (o1.getSBSv2Alias().split("_").length == 3 && o2.getSBSv2Alias().split("_").length == 3 &&
+				if (sbsv2Context1.getSBSv2Alias().split("_").length == 3 && sbsv2Context2.getSBSv2Alias().split("_").length == 3 &&
 						o1.getPlatformString().equals(o2.getPlatformString()))
 					return o1.getTargetString().compareTo(o2.getTargetString());
 				else if (sbsAlias1.split("_").length >= 3 && sbsAlias1.split("_").length >= 3 && !sbsAlias1.equals(sbsAlias2)){
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java	Fri May 28 16:01:18 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,433 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.api.sdk;
-
-import java.io.File;
-import java.util.*;
-
-import org.eclipse.core.runtime.IPath;
-import org.osgi.framework.Version;
-
-import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
-import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianMissingSDKFactory;
-import com.nokia.carbide.cpp.sdk.core.*;
-
-public class SymbianBuildContext implements ISymbianBuildContext {
-
-	private String sdkId;
-	private String platform;
-	private String target;
-	private String displayString = null;
-	private String sbsv2Alias = null;
-	
-	private static String EMULATOR_DISPLAY_TEXT = "Emulator"; //$NON-NLS-1$
-	private static String PHONE_DISPLAY_TEXT = "Phone"; //$NON-NLS-1$
-	private static String DEBUG_DISPLAY_TEXT = "Debug"; //$NON-NLS-1$
-	private static String RELEASE_DISPLAY_TEXT = "Release"; //$NON-NLS-1$
-	private static String SPACE_DISPLAY_TEXT = " "; //$NON-NLS-1$
-	private static String SDK_NOT_INSTALLED = "SDK not installed"; //$NON-NLS-1$
-	
-	// a copy of bad SDK default to fall back
-	private static ISymbianSDK fallbackForBadSdk = SymbianMissingSDKFactory.createInstance("dummy_ID"); //$NON-NLS-1$
-	
-	public SymbianBuildContext(ISymbianSDK theSDK, String thePlatform, String theTarget) {
-		sdkId = theSDK.getUniqueId();
-		platform = thePlatform.toUpperCase();
-		target = theTarget.toUpperCase();
-		
-		getDisplayString();
-	}
-	
-	public SymbianBuildContext(ISymbianSDK theSDK, String thePlatform, String theTarget, String theSBSv2Alias) {
-		sdkId = theSDK.getUniqueId();
-		platform = thePlatform.toUpperCase();
-		target = theTarget.toUpperCase();
-		sbsv2Alias = theSBSv2Alias;
-		
-		getDisplayString();
-	}
-
-	
-	@Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result
-				+ ((platform == null) ? 0 : platform.hashCode());
-		result = prime * result + ((getSDK() == null) ? 0 : getSDK().getEPOCROOT().hashCode());
-		result = prime * result + ((target == null) ? 0 : target.hashCode());
-		return result;
-	}
-
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (!(obj instanceof SymbianBuildContext))
-			return false;
-		final SymbianBuildContext other = (SymbianBuildContext) obj;
-		if (platform == null) {
-			if (other.platform != null)
-				return false;
-		} else if (!platform.equals(other.platform))
-			return false;
-		if (getSDK() == null) {
-			if (other.getSDK() != null)
-				return false;
-		} else if (!getSDK().getEPOCROOT().equals(other.getSDK().getEPOCROOT()))
-			return false;
-		if (target == null) {
-			if (other.target != null)
-				return false;
-		} else if (!target.equals(other.target)) {
-			return false;
-		} else if (sbsv2Alias!= null && !sbsv2Alias.equals(other.sbsv2Alias)) {
-			return false;
-		}
-		return true;
-	}
-
-
-	public ISymbianSDK getSDK() {
-		
-		ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(sdkId, true);
-		if (sdk == null){
-			sdk = fallbackForBadSdk;
-		}
-		
-		return sdk;
-	}
-
-	public String getPlatformString() {
-		return platform.toUpperCase();
-	}
-
-	public String getTargetString() {
-		return target.toUpperCase();
-	}
-
-	public String getDisplayString() {
-		if (displayString == null) {
-			// in the form Emulation Debug (WINSCW) [S60_3rd_MR] or
-			// Phone Release (GCCE) [S60_3rd_MR]
-			if (platform.compareTo(ISymbianBuildContext.EMULATOR_PLATFORM) == 0) {
-				displayString = EMULATOR_DISPLAY_TEXT;
-			} else {
-				displayString = PHONE_DISPLAY_TEXT;
-			}
-			
-			if (target.compareTo(ISymbianBuildContext.DEBUG_TARGET) == 0) {
-				displayString = displayString + SPACE_DISPLAY_TEXT + DEBUG_DISPLAY_TEXT;
-			} else {
-				displayString = displayString + SPACE_DISPLAY_TEXT + RELEASE_DISPLAY_TEXT;
-			}
-			
-			String basePlatform;
-			if (sbsv2Alias != null)
-				basePlatform = sbsv2Alias;
-			else
-				basePlatform = platform;
-			
-			displayString = displayString + " (" + basePlatform + ") [" + getSDK().getUniqueId() + "]"; //$NON-NLS-1$
-		}
-		return displayString;
-	}
-	
-	public static ISymbianBuildContext getBuildContextFromDisplayName(String displayName) {
-		if (isValidConfigName(displayName)) {
-			String sdkId = getSDKIDFromConfigName(displayName);
-			ISymbianSDK sdk = SDKCorePlugin.getSDKManager().getSDK(sdkId, true);
-			if (sdk == null) {
-				// add a dummy should a build context ask for a removed SDK
-				sdk = SDKManagerInternalAPI.addMissingSdk(sdkId);
-			}
-						
-			return new SymbianBuildContext(sdk, 
-						getPlatformFromBuildConfigName(displayName), 
-						getTargetFromBuildConfigName(displayName),
-						getSBSv2AliasFromConfigName(displayName));
-		}
-		return new SymbianBuildContext(fallbackForBadSdk, SDK_NOT_INSTALLED, SDK_NOT_INSTALLED);
-	}
-
-	/**
-	 * See if the build configuration is an SBSv2 alias, and if so get the build-able alias name 
-	 * @param displayName
-	 * @return The full SBSv2 alias that can be used with -c, otherwise null if not SBSv2
-	 */
-	private static String getSBSv2AliasFromConfigName(String displayName) {
-		int indexBegin = displayName.indexOf("(");  //$NON-NLS-1$
-		int indexEnd = displayName.indexOf(")");  //$NON-NLS-1$
-		if (indexBegin > 0 && indexEnd > 0){
-			String configPart =  displayName.substring(indexBegin+1, indexEnd);
-			if (configPart.split("_").length > 1){
-				return configPart;
-			}
-		} 
-		
-		return null;
-	}
-
-	private static String getPlatformFromBuildConfigName(String configName) {
-		String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
-		String sdkIdToken = tokens[2];
-		if (sdkIdToken.contains("_")){
-			sdkIdToken = sdkIdToken.substring(1, sdkIdToken.length()-1);
-			String[] aliasTokens = sdkIdToken.split("_");
-			return aliasTokens[0];
-		} else {
-			return sdkIdToken.substring(1, sdkIdToken.length()-1);
-		}
-		
-	}
-
-	public static String getSDKIDFromConfigName(String configName) {
-		int indexBegin = configName.indexOf("[");  //$NON-NLS-1$
-		int indexEnd = configName.indexOf("]");  //$NON-NLS-1$
-		if (indexBegin > 0 && indexEnd > 0){
-			return configName.substring(indexBegin+1, indexEnd);
-		} else {
-			return ""; //$NON-NLS-1$
-		}
-	}
-
-	private static String getTargetFromBuildConfigName(String configName) {
-		String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
-		if (tokens[1].compareTo(DEBUG_DISPLAY_TEXT) == 0) {
-			return ISymbianBuildContext.DEBUG_TARGET;
-		} else {
-			return ISymbianBuildContext.RELEASE_TARGET;
-		}
-	}
-
-	private static boolean isValidConfigName(String configName) {
-		// <Phone | Emulator> <Target> (<Platform>) [<SDK ID>]
-		if (configName != null && !configName.equals("")) { //$NON-NLS-1$
-			String[] tokens = configName.split(SPACE_DISPLAY_TEXT);
-			if (tokens.length >= 4) {
-				if (tokens[0].compareTo(EMULATOR_DISPLAY_TEXT) == 0 || tokens[0].compareTo(PHONE_DISPLAY_TEXT) == 0) {
-					if (tokens[1].compareTo(DEBUG_DISPLAY_TEXT) == 0 || tokens[1].compareTo(RELEASE_DISPLAY_TEXT) == 0) {
-						if (tokens[2].matches("(.*)")) { //$NON-NLS-1$
-							if (tokens[3].matches("\\[.*")) { //$NON-NLS-1$
-								return true;
-							}
-						}
-					}
-				}
-			}
-		}
-		return false;
-	}
-	
-	public String toString() {
-		return getDisplayString();
-	}
-	
-	public String getDefaultDefFileDirectoryName(boolean isASSP) {
-		// TODO: How the ASSP option affects the path?
-
-		String dirName = getDefFileDirectoryNameForPlatform(platform);
-		if (dirName == null) {
-			// check BSF's
-			IBSFCatalog catalog = getSDK().getBSFCatalog();
-	    	if (catalog != null) {
-	    		for (IBSFPlatform plat : catalog.getPlatforms()) {
-	    			if (plat.getName().compareToIgnoreCase(platform) == 0) {
-	    				String mainPlatform = catalog.getReleasePlatform(platform);
-	    				if (mainPlatform != null) {
-	    					dirName = getDefFileDirectoryNameForPlatform(mainPlatform);
-	    					if (dirName == null || dirName.length() < 1) {
-	    						// fallback - all BSF's should be EABI anyway
-			    				return "EABI"; //$NON-NLS-1$
-	    					}
-	    				}
-	    			}
-	    		}
-	    	}
-		}
-		
-		if (dirName == null) {
-			// fallback for unknown cases
-			dirName = platform;
-		}
-		
-		return dirName;
-	}
-	
-	private String getDefFileDirectoryNameForPlatform(String platform) {
-		if (platform.equals(EMULATOR_PLATFORM)) {
-			return "BWINS"; //$NON-NLS-1$
-		} else if (platform.equals(ARMV5_PLATFORM)
-					|| platform.equals(ARMV5_ABIV2_PLATFORM)
-					|| platform.equals(ARMV6_PLATFORM)
-					|| platform.equals(ARMV6_ABIV2_PLATFORM)
-					|| platform.equals(GCCE_PLATFORM)) {
-			return "EABI"; //$NON-NLS-1$
-		}
-		return null;
-	}
-
-	public IPath getCompilerPrefixFile() {
-		if (platform.equals(GCCE_PLATFORM) || 
-				(sbsv2Alias != null && sbsv2Alias.toUpperCase().contains(GCCE_PLATFORM))) {
-			return getGCCEPrefixFilePath();
-		} else if (platform.equals(ARMV5_PLATFORM)
-					|| platform.equals(ARMV5_ABIV2_PLATFORM)
-					|| platform.equals(ARMV6_PLATFORM)
-					|| platform.equals(ARMV6_ABIV2_PLATFORM)) {
-			return getRVCTPrefixFilePath();
-		} else {
-			// check BSF's
-			IBSFCatalog catalog = getSDK().getBSFCatalog();
-	    	if (catalog != null) {
-	    		for (IBSFPlatform plat : catalog.getPlatforms()) {
-	    			if (plat.getName().compareToIgnoreCase(platform) == 0) {
-	    				String mainPlatform = catalog.getReleasePlatform(platform);
-	    				if (mainPlatform != null) {
-	    					if (mainPlatform.equals(GCCE_PLATFORM)) {
-	    						return getGCCEPrefixFilePath();
-	    					} else if (mainPlatform.equals(ARMV5_PLATFORM) 
-	    								|| mainPlatform.equals(ARMV5_ABIV2_PLATFORM)
-	    								|| mainPlatform.equals(ARMV6_PLATFORM)
-	    								|| mainPlatform.equals(ARMV6_ABIV2_PLATFORM)) {
-	    						return getRVCTPrefixFilePath();
-	    					} else {
-	    						// fallback - all BSF's should be EABI anyway
-	    						return getRVCTPrefixFilePath();
-	    					}
-	    				}
-	    			}
-	    		}
-	    	}
-		}
-
-		// fallback for WINSCW, MSVC, etc.
-		return null;
-	}
-
-	private IPath getGCCEPrefixFilePath() {
-		return getSDK().getIncludePath().append("gcce/gcce.h"); //$NON-NLS-1$
-	}
-
-	private IPath getRVCTPrefixFilePath() {
-		IRVCTToolChainInfo[] installedRVCTTools = SDKCorePlugin.getSDKManager().getInstalledRVCTTools();
-		// use default in case tools aren't installed
-		String rvctFragment = "rvct2_2"; //$NON-NLS-1$
-		if (installedRVCTTools.length > 0) {
-			rvctFragment = getRVCTFragment(installedRVCTTools[0]);
-		}
-		IPath prefixFilePath = getSDK().getIncludePath().append(rvctFragment).append(rvctFragment + ".h"); //$NON-NLS-1$
-		if (prefixFilePath.toFile().exists()){
-			return prefixFilePath;
-		} else {
-			// SF kits around SF^3 started to only use a single rvct.h header instead of specific versioned ones
-			// based on the default installation
-			return getSDK().getIncludePath().append("rvct").append("rvct" + ".h");
-		}
-	}
-
-	private String getRVCTFragment(IRVCTToolChainInfo info) {
-		int major = 0, minor = 0;
-		if (info != null) {
-			Version rvctToolsVersion = info.getRvctToolsVersion();
-			if (rvctToolsVersion != null) {
-				major = info.getRvctToolsVersion().getMajor();
-				minor = info.getRvctToolsVersion().getMinor();
-			}
-		}
-		return "rvct" + major + "_" + minor; //$NON-NLS-1$ //$NON-NLS-2$
-	}
-
-	public List<IDefine> getVariantHRHDefines() {
-
-		return getCachedData().getVariantHRHDefines();
-	}
-
-	public List<File> getPrefixFileIncludes() {
-		return getCachedData().getPrefixFileIncludes();
-	}
-
-
-	public List<IDefine> getCompilerMacros() {
-		// we parse the compiler prefix file to gather macros.  this can be time consuming so do it
-		// once and cache the values.  only reset the cache when the compiler prefix has changed.
-		
-		IPath prefixFile = getCompilerPrefixFile();
-		if (prefixFile == null) {
-			return Collections.emptyList();
-		}
-		
-		return getCachedData().getCompilerMacros(prefixFile);
-	}
-
-
-	public String getBuildVariationName() {
-		String varName = "";
-		
-		String[] tokens = getPlatformString().split("\\.");
-		if (tokens.length == 2){
-			varName = tokens[1];
-		}
-		
-		return varName;
-	}
-
-
-	public boolean isSymbianBinaryVariation() {
-		if (getPlatformString().split("\\.").length == 2){
-			return true;
-		} else {
-			return false;
-		}
-	}
-
-	/**
-	 * Get the cache holding the data that applies to this build context globally.
-	 * A build context is subclassed by CarbideBuildConfiguration, which has multiple
-	 * instances at runtime, thus, a SymbianBuildContext instance should not hold a cache itself.
-	 * @return cache, never <code>null</code>
-	 */
-	private SymbianBuildContextDataCache getCachedData() {
-		return SymbianBuildContextDataCache.getCache(this);
-	}
-	
-
-	public String getBasePlatformForVariation() {
-		String plat = "";
-		
-		String[] tokens = getPlatformString().split("\\.");
-		if (tokens.length == 2){
-			plat = tokens[0];
-		} else {
-			return platform;
-		}
-		
-		return plat;
-	}
-
-
-	/**
-	 * Get the list of #include paths detected for this context.
-	 * @return List or <code>null</code>
-	 */
-	public List<File> getCachedSystemIncludePaths() {
-		return getCachedData().getSystemIncludePaths();
-	}
-
-	public String getSBSv2Alias() {
-		return sbsv2Alias;
-	}
-}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java	Tue Jun 01 15:23:53 2010 -0500
@@ -12,41 +12,69 @@
 */
 package com.nokia.carbide.cpp.internal.sdk.core.model;
 
-import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Source;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.Version;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeIterator;
+import org.xml.sax.SAXException;
+
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefaultModelDocumentProvider;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefaultTranslationUnitProvider;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IDefine;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.api.sdk.BuildPlat;
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
 import com.nokia.carbide.cpp.internal.sdk.core.gen.Devices.DefaultType;
 import com.nokia.carbide.cpp.internal.sdk.core.gen.Devices.DeviceType;
-import com.nokia.carbide.cpp.sdk.core.*;
+import com.nokia.carbide.cpp.sdk.core.IBSFCatalog;
+import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISBVCatalog;
+import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
+import com.nokia.carbide.cpp.sdk.core.ISDKManager;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.BasicIncludeFileLocator;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.MacroScanner;
 import com.nokia.cpp.internal.api.utils.core.PathUtils;
 import com.sun.org.apache.xpath.internal.XPathAPI;
 
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.*;
-import org.osgi.framework.Version;
-import org.w3c.dom.*;
-import org.w3c.dom.traversal.NodeIterator;
-import org.xml.sax.SAXException;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.*;
-import javax.xml.transform.Source;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.*;
-
 public class SymbianSDK implements ISymbianSDK {
 
 	public static final String MANIFEST_XML_LOCATION = "/epoc32/kit/manifest.xml"; //$NON-NLS-1$
@@ -250,11 +278,12 @@
 		if (buildPlats.size() == 0){
 			return Collections.emptyList();
 		}
-		
-		buildTargets.add(new SymbianBuildContext(this, ISymbianBuildContext.EMULATOR_PLATFORM, ISymbianBuildContext.DEBUG_TARGET));
+		// TODO: Hard code build context hack
+		buildTargets.add(new BuildContextSBSv1(this, ISymbianBuildContext.EMULATOR_PLATFORM, ISymbianBuildContext.DEBUG_TARGET));
 		
 		if (supportsWINSCW_UREL()){
-			buildTargets.add(new SymbianBuildContext(this, ISymbianBuildContext.EMULATOR_PLATFORM, ISymbianBuildContext.RELEASE_TARGET));
+			// TODO: Hard code build context hack
+			buildTargets.add(new BuildContextSBSv1(this, ISymbianBuildContext.EMULATOR_PLATFORM, ISymbianBuildContext.RELEASE_TARGET));
 		}
 		
 		for (String currPlat : buildPlats){
@@ -263,11 +292,12 @@
 				// emulation targets already determined (some SDKs don't get WISNCW UREL
 				continue;
 			}
-			
-			buildTargets.add(new SymbianBuildContext(this, currPlat, ISymbianBuildContext.DEBUG_TARGET));
+			// TODO: Hard code build context hack
+			buildTargets.add(new BuildContextSBSv1(this, currPlat, ISymbianBuildContext.DEBUG_TARGET));
 			
 			// everything gets release except for WINSCW
-			buildTargets.add(new SymbianBuildContext(this, currPlat, ISymbianBuildContext.RELEASE_TARGET));
+			// TODO: Hard code build context hack
+			buildTargets.add(new BuildContextSBSv1(this, currPlat, ISymbianBuildContext.RELEASE_TARGET));
 		}
 		
 		ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
@@ -290,8 +320,10 @@
 			for (IBSFPlatform platform : catalog.getPlatforms()) {
 				// only return non-variant style BSF's.  see boog #4533 for details.
 				if (!platform.isVariant()) {
-					bsfContextList.add(new SymbianBuildContext(this, platform.getName().toUpperCase(), ISymbianBuildContext.DEBUG_TARGET));
-					bsfContextList.add(new SymbianBuildContext(this, platform.getName().toUpperCase(), ISymbianBuildContext.RELEASE_TARGET));
+					// TODO: Hard code build context hack
+					bsfContextList.add(new BuildContextSBSv1(this, platform.getName().toUpperCase(), ISymbianBuildContext.DEBUG_TARGET));
+					// TODO: Hard code build context hack
+					bsfContextList.add(new BuildContextSBSv1(this, platform.getName().toUpperCase(), ISymbianBuildContext.RELEASE_TARGET));
 				}
 			}
 		}
@@ -311,8 +343,10 @@
 				// Currently only variation of ARMV5 is supported... So just hard code the variated platform
 				// Only add the build platform if it's not virtual.
 				if (!sbvPlatform.isVirtual()){
-					binaryVariantContextList.add(new SymbianBuildContext(this, SymbianBuildContext.ARMV5_PLATFORM + "." + sbvPlatform.getName(), ISymbianBuildContext.DEBUG_TARGET));
-					binaryVariantContextList.add(new SymbianBuildContext(this, SymbianBuildContext.ARMV5_PLATFORM + "." + sbvPlatform.getName(), ISymbianBuildContext.RELEASE_TARGET));
+					// TODO: Hard code build context hack
+					binaryVariantContextList.add(new BuildContextSBSv1(this, BuildContextSBSv1.ARMV5_PLATFORM + "." + sbvPlatform.getName(), ISymbianBuildContext.DEBUG_TARGET));
+					// TODO: Hard code build context hack
+					binaryVariantContextList.add(new BuildContextSBSv1(this, BuildContextSBSv1.ARMV5_PLATFORM + "." + sbvPlatform.getName(), ISymbianBuildContext.RELEASE_TARGET));
 				}
 			}
 		}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv1BuildContext.java	Tue Jun 01 15:23:53 2010 -0500
@@ -0,0 +1,15 @@
+package com.nokia.carbide.cpp.sdk.core;
+
+public interface ISBSv1BuildContext extends ISymbianBuildContext {
+
+	/**
+	 * For Symbian Bianry Variation, platforms will be names <plat>.<variation>
+	 * So in some cases you need to know only the platforms that the variant is based on.
+	 * For example, a build platform name of "armv5.myvariant" will return "armv5".
+	 * @return The base platform string.
+	 * @see isSymbianBinaryVariation()
+	 * @since 2.0
+	 */
+	public String getBasePlatformForVariation();
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISBSv2BuildContext.java	Tue Jun 01 15:23:53 2010 -0500
@@ -0,0 +1,11 @@
+package com.nokia.carbide.cpp.sdk.core;
+
+public interface ISBSv2BuildContext extends ISymbianBuildContext {
+	/**
+	 * 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.
+	 * @return the configuration name, or null if none.
+	 */
+	public String getSBSv2Alias();
+	
+}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java	Tue Jun 01 15:23:53 2010 -0500
@@ -66,15 +66,6 @@
 	 */
 	public String getPlatformString();
 	
-	/**
-	 * For Symbian Bianry Variation, platforms will be names <plat>.<variation>
-	 * So in some cases you need to know only the platforms that the variant is based on.
-	 * For example, a build platform name of "armv5.myvariant" will return "armv5".
-	 * @return The base platform string.
-	 * @see isSymbianBinaryVariation()
-	 * @since 2.0
-	 */
-	public String getBasePlatformForVariation();
 	
 	/**
 	 * The debug or release target the platform is building for.
@@ -141,11 +132,5 @@
 	 */
 	public boolean isSymbianBinaryVariation();
 	
-	/**
-	 * 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.
-	 * @return the configuration name, or null if none.
-	 */
-	public String getSBSv2Alias();
 	
 }
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java	Fri May 28 16:01:18 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java	Tue Jun 01 15:23:53 2010 -0500
@@ -384,4 +384,5 @@
 	 */
 	void setPreviouslyScanned(boolean wasScanned);
 	
+	
 }
--- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView3.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView3.java	Tue Jun 01 15:23:53 2010 -0500
@@ -17,25 +17,27 @@
 
 package com.nokia.carbide.cpp.epoc.engine.tests.model;
 
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Version;
+
 import com.nokia.carbide.cdt.builder.DefaultMMPViewConfiguration;
 import com.nokia.carbide.cdt.builder.DefaultViewParserConfiguration;
 import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement;
 import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPView;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefineFactory;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.carbide.cpp.sdk.core.SymbianSDKFactory;
 import com.nokia.cpp.internal.api.utils.core.PathUtils;
 
-import org.eclipse.core.runtime.*;
-import org.osgi.framework.Version;
-
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Test MMP view manipulation
  *
@@ -68,9 +70,9 @@
 			}
 		}
 		if (sdk != null) {
-			winscwContext = new SymbianBuildContext(sdk, "WINSCW", "UDEB");
-			armv5Context = new SymbianBuildContext(sdk, "ARMV5", "UDEB");
-			gcceContext = new SymbianBuildContext(sdk, "GCCE", "UREL");
+			winscwContext = new BuildContextSBSv1(sdk, "WINSCW", "UDEB");
+			armv5Context = new BuildContextSBSv1(sdk, "ARMV5", "UDEB");
+			gcceContext = new BuildContextSBSv1(sdk, "GCCE", "UREL");
 			buildContexts.add(winscwContext);
 			buildContexts.add(armv5Context);
 			buildContexts.add(gcceContext);
--- a/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/MissingSdkTest.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/MissingSdkTest.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,23 +16,29 @@
 */
 package com.nokia.carbide.cpp.project.core.tests;
 
-import java.io.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.util.ArrayList;
 import java.util.List;
 
 import junit.framework.TestCase;
 
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
 
 import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.api.sdk.SBSv2Utils;
 import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
 import com.nokia.carbide.cpp.project.core.ProjectCorePlugin;
-import com.nokia.carbide.cpp.sdk.core.*;
+import com.nokia.carbide.cpp.sdk.core.ISDKManager;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 
 public class MissingSdkTest extends TestCase {
 	
@@ -108,8 +114,10 @@
 			// check we only have those configs in the removed SDK in the missing list
 			List<ICarbideBuildConfiguration> configList = cpi.getBuildConfigurations();
 			int badCount = 0;
-			for (ICarbideBuildConfiguration config: configList) {				
-				if (SDKManagerInternalAPI.getMissingSdk(SymbianBuildContext.getSDKIDFromConfigName(config.getDisplayString())) != null) {
+			for (ICarbideBuildConfiguration config: configList) {		
+				// TODO: Hack to use static method for prototyping BuildContextSBSv1.getSDKIDFromConfigName
+				// Should be no static calls on those classes.
+				if (SDKManagerInternalAPI.getMissingSdk(BuildContextSBSv1.getSDKIDFromConfigName(config.getDisplayString())) != null) {
 					badCount++;
 				}
 			}
--- a/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/TestBldInfImportDataLoader.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.core.tests/src/com/nokia/carbide/cpp/project/core/tests/TestBldInfImportDataLoader.java	Tue Jun 01 15:23:53 2010 -0500
@@ -37,7 +37,7 @@
 import com.nokia.carbide.cpp.api.test.support.gen.InfImportTestData.InfComponentType;
 import com.nokia.carbide.cpp.api.test.support.gen.InfImportTestData.MakMakeRefType;
 import com.nokia.carbide.cpp.api.test.support.xml.BldInfImportDataLoader;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.project.utils.BldInfImportWrapper;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -88,7 +88,7 @@
 			for (BuildConfigType currConfigData : currInfData.getBuildConfigurations().getBuildConfig()){
 				String plat = currConfigData.getPlatform();
 				String target = currConfigData.getTarget().getName();
-				SymbianBuildContext context = new SymbianBuildContext(sdk, plat, target);
+				BuildContextSBSv1 context = new BuildContextSBSv1(sdk, plat, target);
 				buildConfigs.add(context);
 			}
 			
--- a/project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ResourceChangeListener.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.core/src/com/nokia/carbide/cpp/internal/api/project/core/ResourceChangeListener.java	Tue Jun 01 15:23:53 2010 -0500
@@ -454,7 +454,7 @@
 							}
 
 							// check the extensions
-							BldInfViewPathHelper helper = new BldInfViewPathHelper(infView, cpi.getDefaultConfiguration());
+							BldInfViewPathHelper helper = new BldInfViewPathHelper(infView, cpi.getDefaultConfiguration().getBuildContext());
 							for (IExtension extension : infView.getAllExtensions()) {
 								IPath path = infPathHelper.convertToProject(helper.convertExtensionTemplateToFilesystem(extension.getTemplatePath()));
 								if (path != null) {
@@ -939,7 +939,7 @@
 							}
 
 							// check the extensions
-							BldInfViewPathHelper helper = new BldInfViewPathHelper(infView, cpi.getDefaultConfiguration());
+							BldInfViewPathHelper helper = new BldInfViewPathHelper(infView, cpi.getDefaultConfiguration().getBuildContext());
 							List<IExtension> extensions = infView.getExtensions();
 							for (Iterator<IExtension> iter = extensions.iterator(); iter.hasNext();) {
 								IPath path = infPathHelper.convertToProject(helper.convertExtensionTemplateToFilesystem(iter.next().getTemplatePath()));
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/AIFOutputFileParametersComposite.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/AIFOutputFileParametersComposite.java	Tue Jun 01 15:23:53 2010 -0500
@@ -135,7 +135,7 @@
 				emptyIfNull(aifInfo.getResource()),
 				EMMPPathContext.AIF_SOURCE,
 				editorContext.getMMPViewPathHelper(),
-				editorContext.getBuildContext(),
+				editorContext.getCarbideBuildConfiguration(),
 				editorContext.getRSSFiles(),
 				new String[] { "*.rss" }, //$NON-NLS-1$
 				Messages.getString("AIFOutputFileParametersComposite.ResourceFilePathLabel")); //$NON-NLS-1$
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContext.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContext.java	Tue Jun 01 15:23:53 2010 -0500
@@ -132,7 +132,7 @@
 			this.generatedExtension = "mif"; //$NON-NLS-1$
 			this.imagePathHelper = new ImageMakefileViewPathHelper(
 					(IImageMakefileView) view, 
-					new ISymbianBuildContext[] { getBuildContext() });
+					new ISymbianBuildContext[] { getCarbideBuildConfiguration().getBuildContext() });
 		}
 		
 		commonInit();
@@ -367,7 +367,7 @@
 	public boolean supportsHeaderOnlyFlag() {
 		if (imageFileType == MBM_FILE) {
 			// flag added in 9.2
-			ISymbianBuildContext buildContext = getBuildContext();
+			ISymbianBuildContext buildContext = getCarbideBuildConfiguration().getBuildContext();
 			if (buildContext == null)
 				return false;
 			Version version = buildContext.getSDK().getOSVersion();
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContextBase.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/images/MultiImageEditorContextBase.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,26 +16,22 @@
 */
 package com.nokia.carbide.cpp.internal.project.ui.editors.images;
 
-import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.ImageMakefileViewPathHelper;
-import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
-import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cpp.epoc.engine.image.*;
-import com.nokia.carbide.cpp.epoc.engine.model.*;
-import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
-import com.nokia.carbide.cpp.internal.project.ui.images.*;
-import com.nokia.carbide.cpp.internal.project.ui.images.providers.ThumbnailImageLabelProvider;
-import com.nokia.carbide.cpp.internal.ui.images.CachingImageLoader;
-import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.carbide.cpp.ui.images.IImageLoader;
-import com.nokia.carbide.cpp.ui.images.IImageModel;
-import com.nokia.cpp.internal.api.utils.core.CacheMap;
+import java.util.ArrayList;
+import java.util.regex.Pattern;
 
 import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.*;
+import org.eclipse.core.commands.operations.DefaultOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistory;
+import org.eclipse.core.commands.operations.IOperationHistoryListener;
+import org.eclipse.core.commands.operations.IUndoContext;
+import org.eclipse.core.commands.operations.OperationHistoryEvent;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.DialogSettings;
 import org.eclipse.jface.dialogs.IDialogSettings;
 import org.eclipse.swt.graphics.Image;
@@ -44,8 +40,31 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.PlatformUI;
 
-import java.util.ArrayList;
-import java.util.regex.Pattern;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.ImageMakefileViewPathHelper;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cpp.epoc.engine.image.IBitmapSourceReference;
+import com.nokia.carbide.cpp.epoc.engine.image.IImageSource;
+import com.nokia.carbide.cpp.epoc.engine.image.IImageSourceReference;
+import com.nokia.carbide.cpp.epoc.engine.image.ISVGSourceReference;
+import com.nokia.carbide.cpp.epoc.engine.image.ImageFormat;
+import com.nokia.carbide.cpp.epoc.engine.model.IModel;
+import com.nokia.carbide.cpp.epoc.engine.model.IModelProvider;
+import com.nokia.carbide.cpp.epoc.engine.model.IView;
+import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
+import com.nokia.carbide.cpp.internal.project.ui.images.CarbideImageModelFactory;
+import com.nokia.carbide.cpp.internal.project.ui.images.IImageResolver;
+import com.nokia.carbide.cpp.internal.project.ui.images.IImageSourceModel;
+import com.nokia.carbide.cpp.internal.project.ui.images.IImageSourceReferenceModel;
+import com.nokia.carbide.cpp.internal.project.ui.images.ISymbianImageContainerModel;
+import com.nokia.carbide.cpp.internal.project.ui.images.providers.ThumbnailImageLabelProvider;
+import com.nokia.carbide.cpp.internal.ui.images.CachingImageLoader;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.ui.images.IImageLoader;
+import com.nokia.carbide.cpp.ui.images.IImageModel;
+import com.nokia.cpp.internal.api.utils.core.CacheMap;
 
 public abstract class MultiImageEditorContextBase {
 	private static final Pattern LEGAL_FILENAME_PATTERN = Pattern.compile("[A-Za-z0-9_]+"); //$NON-NLS-1$
@@ -247,7 +266,7 @@
 	 * Get the default build context.
 	 * @return build context or null
 	 */
-	public ICarbideBuildConfiguration getBuildContext() {
+	public ICarbideBuildConfiguration getCarbideBuildConfiguration() {
 		IProject project = getProject();
 		if (project == null)
 			return null;
@@ -401,7 +420,7 @@
 	 * @return
 	 */
 	public boolean isEKA2() {
-		ISymbianBuildContext buildContext = getBuildContext();
+		ISymbianBuildContext buildContext = getCarbideBuildConfiguration().getBuildContext();
 		ISymbianSDK sdk = buildContext != null ? buildContext.getSDK() : null;
 		if (sdk != null) {
 			return sdk.isEKA2();
@@ -414,7 +433,7 @@
 	 * @return
 	 */
 	public boolean isS60() {
-		ISymbianBuildContext buildContext = getBuildContext();
+		ISymbianBuildContext buildContext = getCarbideBuildConfiguration().getBuildContext();
 		ISymbianSDK sdk = buildContext != null ? buildContext.getSDK() : null;
 		if (sdk != null) {
 			return sdk.isS60();
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java	Tue Jun 01 15:23:53 2010 -0500
@@ -197,7 +197,7 @@
 			editorContext.bldInfView = null;
 		}
 		BldInfEditorViewConfiguration viewConfig = new BldInfEditorViewConfiguration(
-				editorContext.activeBuildConfig, getProject());
+				editorContext.activeBuildConfig.getBuildContext(), getProject());
 		editorContext.bldInfView = editorContext.bldInfModel.createView(viewConfig);						
 	}
 	
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/images/providers/ImageTableLabelProvider.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/images/providers/ImageTableLabelProvider.java	Tue Jun 01 15:23:53 2010 -0500
@@ -60,7 +60,7 @@
 		if (view instanceof IImageMakefileView) {
 			this.imageViewPathHelper = new ImageMakefileViewPathHelper(
 					(IImageMakefileView) view, 
-					new ISymbianBuildContext[] { editorContext.getBuildContext() });
+					new ISymbianBuildContext[] { editorContext.getCarbideBuildConfiguration().getBuildContext() });
 		}
 		COLUMN_THUMB = 0;
 		COLUMN_FORMAT = 1;
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/LibrarySectionPart.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/LibrarySectionPart.java	Tue Jun 01 15:23:53 2010 -0500
@@ -220,7 +220,7 @@
 	
 	@SuppressWarnings("unchecked") //$NON-NLS-1$
 	protected void addButtonPressed() {
-		Set<String> sdkLibraries = EpocEngineHelper.getSDKLibrariesForBuildContext(editorContext.activeBuildConfig);
+		Set<String> sdkLibraries = EpocEngineHelper.getSDKLibrariesForBuildContext(editorContext.activeBuildConfig.getBuildContext());
 		// remove already included libraries from the list so we don't show them as candidates for adding
 		List<String> includedList = (List<String>) tableViewer.getInput();
 		sdkLibraries.removeAll(includedList);
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java	Tue Jun 01 15:23:53 2010 -0500
@@ -219,7 +219,7 @@
 			editorContext.mmpView = null;
 		}
 		MMPEditorViewConfiguration viewConfig = new MMPEditorViewConfiguration(
-				editorContext.activeBuildConfig, getProject());
+				editorContext.activeBuildConfig.getBuildContext(), getProject());
 		editorContext.mmpView = editorContext.mmpModel.createView(viewConfig);						
 	}
 	
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/views/SPNViewContentProvider.java	Tue Jun 01 15:23:53 2010 -0500
@@ -16,40 +16,102 @@
 */
 package com.nokia.carbide.cpp.internal.project.ui.views;
 
-import com.nokia.carbide.cdt.builder.*;
-import com.nokia.carbide.cdt.builder.project.*;
-import com.nokia.carbide.cpp.epoc.engine.*;
-import com.nokia.carbide.cpp.epoc.engine.image.*;
-import com.nokia.carbide.cpp.epoc.engine.model.bldinf.*;
-import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
-import com.nokia.carbide.cpp.epoc.engine.model.makefile.image.IImageMakefileData;
-import com.nokia.carbide.cpp.epoc.engine.model.mmp.*;
-import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
-import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.carbide.cpp.ui.CarbideUIPlugin;
-import com.nokia.carbide.cpp.ui.ICarbideSharedImages;
-import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.DependencyScanner;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Set;
 
-import org.eclipse.cdt.core.model.*;
+import org.eclipse.cdt.core.model.CModelException;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.model.CoreModelUtil;
+import org.eclipse.cdt.core.model.ElementChangedEvent;
+import org.eclipse.cdt.core.model.ICElement;
+import org.eclipse.cdt.core.model.ICElementDelta;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.model.IElementChangedListener;
 import org.eclipse.cdt.core.model.ITranslationUnit;
 import org.eclipse.cdt.internal.core.model.ExternalTranslationUnit;
 import org.eclipse.cdt.ui.CElementGrouping;
 import org.eclipse.cdt.ui.CElementSorter;
 import org.eclipse.core.filesystem.URIUtil;
-import org.eclipse.core.resources.*;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.core.runtime.IAdapterManager;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerSorter;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.*;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.model.BaseWorkbenchContentProvider;
 import org.eclipse.ui.model.IWorkbenchAdapter;
 
-import java.io.*;
-import java.util.*;
+import com.nokia.carbide.cdt.builder.BldInfViewPathHelper;
+import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
+import com.nokia.carbide.cdt.builder.DefaultImageMakefileViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultMMPViewConfiguration;
+import com.nokia.carbide.cdt.builder.DefaultViewConfiguration;
+import com.nokia.carbide.cdt.builder.EMMPPathContext;
+import com.nokia.carbide.cdt.builder.EpocEnginePathHelper;
+import com.nokia.carbide.cdt.builder.ImageMakefileViewPathHelper;
+import com.nokia.carbide.cdt.builder.MMPViewPathHelper;
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+import com.nokia.carbide.cdt.builder.project.ICarbideConfigurationChangedListener;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.carbide.cdt.builder.project.ICarbideProjectPropertyChangedListener;
+import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
+import com.nokia.carbide.cpp.epoc.engine.BldInfDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
+import com.nokia.carbide.cpp.epoc.engine.ImageMakefileDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter;
+import com.nokia.carbide.cpp.epoc.engine.image.IBitmapSource;
+import com.nokia.carbide.cpp.epoc.engine.image.IBitmapSourceReference;
+import com.nokia.carbide.cpp.epoc.engine.image.IImageSource;
+import com.nokia.carbide.cpp.epoc.engine.image.IMultiImageSource;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfData;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMMPReference;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakMakeReference;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakefileReference;
+import com.nokia.carbide.cpp.epoc.engine.model.makefile.image.IImageMakefileData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPAIFInfo;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefaultModelDocumentProvider;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.DefaultTranslationUnitProvider;
+import com.nokia.carbide.cpp.epoc.engine.preprocessor.IIncludeFileLocator;
+import com.nokia.carbide.cpp.internal.project.ui.ProjectUIPlugin;
+import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+import com.nokia.carbide.cpp.ui.CarbideUIPlugin;
+import com.nokia.carbide.cpp.ui.ICarbideSharedImages;
+import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.DependencyScanner;
 
 /**
  * Content provider for the SymbianProjectNavigatorView
@@ -684,7 +746,7 @@
 			        }
 
 					EpocEnginePlugin.runWithBldInfData(cpi.getWorkspaceRelativeBldInfPath(), 
-						new DefaultViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+						new DefaultViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 						new BldInfDataRunnableAdapter() {
 
 							public Object run(IBldInfData view) {
@@ -845,7 +907,7 @@
 								
 								// get the list of extension makefiles
 								BldInfViewPathHelper pathHelper = new BldInfViewPathHelper(view, 
-										cpi.getDefaultConfiguration());
+										cpi.getDefaultConfiguration().getBuildContext());
 								
 								Set<IPath> visitedPaths = new HashSet<IPath>();
 										
@@ -1287,7 +1349,7 @@
 	        final ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
 	        final IFile mmpFile = parentFile;
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData data) {
@@ -1395,7 +1457,7 @@
 
 			final ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -1461,7 +1523,7 @@
 	        	return resources;
 	        
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -1685,7 +1747,7 @@
 	        	return includes;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					private MMPViewPathHelper helper = new MMPViewPathHelper(cpi.getDefaultConfiguration());
@@ -1764,7 +1826,7 @@
 	        	return mbmContainers;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -1844,7 +1906,7 @@
 	        	return documents;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -1889,7 +1951,7 @@
 	        	return defs;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -1947,7 +2009,7 @@
 	        	return mbmSources;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
@@ -2029,9 +2091,13 @@
 
 					public Object run(IImageMakefileData data) {
 						List<ICarbideBuildConfiguration> configs = cpi.getBuildConfigurations();
+						List<ISymbianBuildContext> buildContexs = new ArrayList<ISymbianBuildContext>();
+						for (ICarbideBuildConfiguration config : configs){
+							buildContexs.add(config.getBuildContext());
+						}
 						ImageMakefileViewPathHelper helper = new ImageMakefileViewPathHelper(
 								data, 
-								(ICarbideBuildConfiguration[]) configs.toArray(new ICarbideBuildConfiguration[configs.size()])); 
+								(ISymbianBuildContext[]) configs.toArray(new ISymbianBuildContext[buildContexs.size()])); 
 						List<IMultiImageSource> images = data.getMultiImageSources();
 						for (IMultiImageSource image : images) {
 							if (image.getTargetFilePath().equals(targetFilePath)) {
@@ -2159,7 +2225,7 @@
 	        	return aifs;
 
 			EpocEnginePlugin.runWithMMPData(parentFile.getFullPath(), 
-					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration(), new AcceptedNodesViewFilter()), 
+					new DefaultMMPViewConfiguration(project, cpi.getDefaultConfiguration().getBuildContext(), new AcceptedNodesViewFilter()), 
 					new MMPDataRunnableAdapter() {
 
 					public Object run(IMMPData view) {
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/ImporterScritpingUtils.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/ImporterScritpingUtils.java	Tue Jun 01 15:23:53 2010 -0500
@@ -10,11 +10,10 @@
 import org.eclipse.core.runtime.Path;
 
 import com.nokia.carbide.cdt.builder.EpocEngineHelper;
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.internal.project.utils.BldInfImportWrapper;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 
 public class ImporterScritpingUtils {
 
@@ -116,7 +115,7 @@
 				// Validate target and context strings against ISymbianBuildContext
 //				AssertTestCase.assertTrue("!Invalid build target, should be ARMV5, GCCE, WINSCW, etc.. but was: " + buildTarget, validateBuildTarget(buildTarget));
 //				AssertTestCase.assertTrue("!Invalid build context, should be UREL or UDEB, but was: " + buildContext, validateBuildContext(buildContext));
-				ISymbianBuildContext context = new SymbianBuildContext(sdk, buildTarget, buildContext);
+				BuildContextSBSv1 context = new BuildContextSBSv1(sdk, buildTarget, buildContext);
 				selectedConfigs.add(context);		
 			}
 		}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/SymbianProject.java	Fri May 28 16:01:18 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/scripting/SymbianProject.java	Tue Jun 01 15:23:53 2010 -0500
@@ -23,7 +23,7 @@
 
 import org.eclipse.core.resources.IProject;
 
-import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
+import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
 import com.nokia.carbide.cpp.sdk.core.ISDKManager;
 import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
 import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
@@ -51,7 +51,7 @@
 					// " is not on the same drive as SDK: " + sdkName
 					// + " and could not import: " + projectName);
 				}
-				contexts.add(new SymbianBuildContext(sdk, currMap
+				contexts.add(new BuildContextSBSv1(sdk, currMap
 						.get(KEY_PLATFORM), currMap.get(KEY_TARGET)));
 			}
 		}
--- a/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QMakeEnvironmentModifier.java	Fri May 28 16:01:18 2010 -0500
+++ b/qt/com.nokia.carbide.cpp.qt.ui/src/com/nokia/carbide/cpp/internal/qt/ui/QMakeEnvironmentModifier.java	Tue Jun 01 15:23:53 2010 -0500
@@ -40,7 +40,7 @@
 			if (cpi != null) {
 				ICarbideBuildConfiguration config = cpi.getDefaultConfiguration();
 				if (config != null) {
-					ISymbianSDK sdk = config.getSDK();
+					ISymbianSDK sdk = config.getBuildContext().getSDK();
 					if (sdk != null) {
 						// set EPOCROOT for the SDK of the current build configuration
 						IPath epocRoot = new Path(sdk.getEPOCROOT());