refactor out some items from ICarbideBuildConfiguration that should just be under ISymbianBuildContext
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Thu Aug 05 11:54:21 2010 -0500
@@ -2234,7 +2234,7 @@
if (cpi != null){
ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
if (defaultConfig != null){
- if (defaultConfig.getBuildVariationName().length() > 0 &&
+ if (defaultConfig.getBuildContext().getBuildVariationName().length() > 0 &&
mmpData.getFlags().contains(EMMPStatement.FEATUREVARIANT)) {
isFeatureVariant = true;
} else if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(project) &&
@@ -2369,7 +2369,7 @@
} else {
basePlat = config.getPlatformString();
}
- String variantPlat = config.getBuildVariationName();
+ String variantPlat = config.getBuildContext().getBuildVariationName();
if (variantPlat.length() == 0){
plat = plat + "." + ISymbianBuildContext.DEFAULT_VARIANT;
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Thu Aug 05 11:54:21 2010 -0500
@@ -16,13 +16,11 @@
*/
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.builder.CarbideCPPBuilder;
-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;
@@ -114,38 +112,11 @@
* @since 3.0 */
String getTargetString();
- /** ISymbianBuildContext wrapper
- * @since 3.0 */
- public IPath getCompilerPrefixFile();
-
- /** ISymbianBuildContext wrapper
- * @since 3.0 */
- public List<IDefine> getCompilerMacros();
-
- /** ISymbianBuildContext wrapper
- * @since 3.0 */
- public List<IDefine> getVariantHRHDefines();
-
- /** ISymbianBuildContext wrapper
- * @since 3.0 */
- public List<File> getPrefixFileIncludes();
-
- /** ISymbianBuildContext wrapper
- * @since 3.0 */
- public String getBuildVariationName();
-
- /**
- * Get the <cconfiguration/> 'id' attribute for this configuration (from .cproject file). This is an ISymbianBuildContext wrapper.
- * @return String
- * @since 3.0
- */
- String getConfigurationID();
-
/**
* Check that at least one MMP in the project configuration has stdcpp support keyword
* @return
* @since 3.0
*/
- public boolean hasSTDCPPSupport();
+ boolean hasSTDCPPSupport();
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Thu Aug 05 11:54:21 2010 -0500
@@ -128,7 +128,7 @@
@Override
public String getId() {
if (carbideBuildConfig.getBuildContext() instanceof ISBSv1BuildContext){
- return carbideBuildConfig.getDisplayString();
+ return carbideBuildConfig.getBuildContext().getDisplayString();
} else if (carbideBuildConfig.getBuildContext() instanceof ISBSv2BuildContext) {
return ((ISBSv2BuildContext)carbideBuildConfig.getBuildContext()).getConfigID();
}
@@ -138,7 +138,7 @@
@Override
public String getName() {
- return carbideBuildConfig.getDisplayString();
+ return carbideBuildConfig.getBuildContext().getDisplayString();
}
@Override
@@ -285,7 +285,7 @@
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(cpi.getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getConfigurationID());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(carbideBuildConfig.getBuildContext().getConfigurationID());
if (configDes != null) {
String sourcesCacheValue = "";
for (ICSourceEntry src : sourceEntries) {
@@ -316,7 +316,7 @@
try {
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(project);
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(((CarbideBuildConfiguration)carbideBuildConfig).getConfigurationID());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(((CarbideBuildConfiguration)carbideBuildConfig).getBuildContext().getConfigurationID());
if (configDes != null) {
ICStorageElement storage = configDes.getStorage(CONFIG_DATA_CACHE, false);
if (storage != null) {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Thu Aug 05 11:54:21 2010 -0500
@@ -16,7 +16,6 @@
*/
package com.nokia.carbide.cdt.internal.builder;
-import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -43,8 +42,6 @@
import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
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.BuildArgumentsInfo;
import com.nokia.carbide.cpp.internal.api.sdk.BuildContextSBSv1;
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildContext;
import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo;
@@ -145,7 +142,7 @@
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(projectTracker.getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(getConfigurationID());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(getBuildContext().getConfigurationID());
if (configDes != null) {
// save the CDT project description. this saves all configs but that's the
// only thing CDT allows at this point.
@@ -160,18 +157,6 @@
return false;
}
-
- /**
- * Get the unique ID for this build configuration.
- * For ABLD it is the display name, for SBSv2, it is the builder ID
- * @return
- */
- public String getConfigurationID() {
- if (context instanceof ISBSv2BuildContext){
- return ((ISBSv2BuildContext) context).getConfigID();
- }
- return context.getDisplayString();
- }
public List<ISISBuilderInfo> getSISBuilderInfoList() {
return sisBuilderInfoList;
@@ -298,26 +283,6 @@
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();
- }
public boolean hasSTDCPPSupport() {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Thu Aug 05 11:54:21 2010 -0500
@@ -158,11 +158,11 @@
Set<ICLanguageSettingEntry> macros = new HashSet<ICLanguageSettingEntry>();
macros.addAll(macroEntries);
- for (IDefine define : carbideBuildConfig.getVariantHRHDefines()) {
+ for (IDefine define : carbideBuildConfig.getBuildContext().getVariantHRHDefines()) {
macros.add(new CMacroEntry(define.getNameAndArguments(), define.getExpansion(), 0));
}
- for (IDefine define : carbideBuildConfig.getCompilerMacros()) {
+ for (IDefine define : carbideBuildConfig.getBuildContext().getCompilerMacros()) {
macros.add(new CMacroEntry(define.getNameAndArguments(), define.getExpansion(), 0));
}
@@ -316,7 +316,7 @@
macros.putAll(sbsv2BuildInfo.getPlatformMacros(carbideBuildConfig.getPlatformString()));
}
- if (carbideBuildConfig.hasSTDCPPSupport()){
+ if ((carbideBuildConfig).hasSTDCPPSupport()){
macros.put("__SYMBIAN_STDCPP_SUPPORT__", "");
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java Thu Aug 05 11:54:21 2010 -0500
@@ -2323,7 +2323,7 @@
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getPrefixFileIncludes()) {
if (file.lastModified() > oldestMakefileTimestamp) {
return true;
}
@@ -2444,7 +2444,7 @@
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getPrefixFileIncludes()) {
if (file.lastModified() > makefileTimestamp) {
return true;
}
@@ -2527,7 +2527,7 @@
return true;
}
- for (File file : config.getPrefixFileIncludes()) {
+ for (File file : config.getBuildContext().getPrefixFileIncludes()) {
if (file.lastModified() > makefileTimestamp) {
return true;
}
@@ -2804,7 +2804,7 @@
newRule = newRule + "\t" + cpp + " -undef -M -nostdinc ";
// add the compiler prefix file if any
- IPath compilerPrefix = config.getCompilerPrefixFile();
+ IPath compilerPrefix = config.getBuildContext().getCompilerPrefixFile();
if (compilerPrefix != null) {
newRule = newRule + "-include \"" + compilerPrefix.toOSString() + "\" ";
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/PathsAndSymbolsTabComposite.java Thu Aug 05 11:54:21 2010 -0500
@@ -256,7 +256,7 @@
ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(buildConfig.getCarbideProject().getProject());
if (projDes != null) {
- ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getConfigurationID());
+ ICConfigurationDescription configDes = projDes.getConfigurationById(buildConfig.getBuildContext().getConfigurationID());
if (configDes != null) {
CConfigurationData configData = configDes.getConfigurationData();
if (configData != null) {
--- a/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Wed Aug 04 16:39:47 2010 -0500
+++ b/builder/com.nokia.carbide.cpp.builder.utils/src/com/nokia/carbide/cpp/internal/builder/utils/handlers/PreprocessHandler.java Thu Aug 05 11:54:21 2010 -0500
@@ -195,7 +195,7 @@
}
// add the compiler prefix file if any
- IPath compilerPrefix = buildConfig.getCompilerPrefixFile();
+ IPath compilerPrefix = buildConfig.getBuildContext().getCompilerPrefixFile();
if (compilerPrefix != null) {
args.add("-include"); //$NON-NLS-1$
args.add("\"" + compilerPrefix.toOSString() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -444,7 +444,6 @@
macros.add("__SYMBIAN_STDCPP_SUPPORT__");
}
-
IProject project = buildConfig.getCarbideProject().getProject();
List<IPath> mmps = EpocEngineHelper.getMMPsForSource(project, filePath);
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.java Wed Aug 04 16:39:47 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv1.java Thu Aug 05 11:54:21 2010 -0500
@@ -552,7 +552,15 @@
public void saveConfigurationSettings(ICStorageElement se, ISymbianBuildContext context) {
saveBuildArgsToStorage(se.createChild(ARGUMENTS_DATA_ID));
}
-
-
+
+ @Override
+ /**
+ * Get the unique ID for this build configuration.
+ * For ABLD it is the display name, for SBSv2, it is the builder ID
+ * @return
+ */
+ public String getConfigurationID() {
+ return getDisplayString();
+ }
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Wed Aug 04 16:39:47 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Thu Aug 05 11:54:21 2010 -0500
@@ -391,5 +391,16 @@
sbsv2BuildInfo = new SBSv2BuilderInfo((ISBSv2BuildContext)context);
sbsv2BuildInfo.saveToStorage(se.createChild(SBSV2_DATA_ID));
}
+
+ @Override
+ /**
+ * Get the unique ID for this build configuration.
+ * For ABLD it is the display name, for SBSv2, it is the builder ID (cconfiguration 'id')
+ * @return
+ */
+ public String getConfigurationID() {
+ return getConfigID();
+ }
+
}
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Wed Aug 04 16:39:47 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianBuildContext.java Thu Aug 05 11:54:21 2010 -0500
@@ -138,4 +138,11 @@
*/
public void saveConfigurationSettings(ICStorageElement se, ISymbianBuildContext ISymbianBuildContext);
+ /**
+ * Get the <cconfiguration/> 'id' attribute for this configuration (from .cproject file). This is an ISymbianBuildContext wrapper.
+ * @return String
+ * @since 3.0
+ */
+ String getConfigurationID();
+
}