more work to keep SBSv2 and SBSV1 working after refactoring. I think we are back to functional parity as before the refactoring now.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Wed Jun 02 18:27:30 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Thu Jun 03 09:58:29 2010 -0500
@@ -310,14 +310,14 @@
ISymbianBuildContext buildContext = (ISymbianBuildContext)currConfigNode.getValue();
for (ICarbideBuildConfiguration currExistingConfig : buildConfigList){
boolean checkIt = false;
- checkIt = currExistingConfig.equals(buildContext);
+ checkIt = currExistingConfig.getBuildContext().equals(buildContext);
if (CarbideBuilderPlugin.getBuildManager().isCarbideSBSv2Project(cpi.getProject()) &&
!checkIt){
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()) &&
+ if (v2Context.getSBSv2Alias().equals(((ISBSv2BuildContext)currExistingConfig.getBuildContext()).getSBSv2Alias()) &&
v2Context.getPlatformString().equals(currExistingConfig.getPlatformString()) &&
v2Context.getSDK().getUniqueId().equals(currExistingConfig.getSDK().getUniqueId() )
&& v2Context.getSBSv2Alias() != null && v2Context.getSBSv2Alias().split("_").length == 2){
@@ -370,7 +370,7 @@
ISymbianBuildContext context = (ISymbianBuildContext)node.getValue();
// Now check to see if the config already exists, if not create a new one
for (ICarbideBuildConfiguration currExistingConfig : buildConfigList){
- if (currExistingConfig.equals(context)){
+ if (currExistingConfig.getBuildContext().equals(context)){
configAlreadyExists = true;
break;
}
@@ -398,7 +398,7 @@
if (currConfigNode.getValue() instanceof ISymbianBuildContext){
// if the current config is already a config set it to checked.
ISymbianBuildContext buildContext = (ISymbianBuildContext)currConfigNode.getValue();
- if (currExistingConfig.equals(buildContext)){
+ if (currExistingConfig.getBuildContext().equals(buildContext)){
// The configuration is in both the tree viewer and the .settings
// Now find out if it's checked. If it's not checked remove it
if (!properSdkViewer.getChecked(currConfigNode)){
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Wed Jun 02 18:27:30 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/BuildContextSBSv2.java Thu Jun 03 09:58:29 2010 -0500
@@ -300,6 +300,47 @@
return ""; //$NON-NLS-1$
}
}
+
+ @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 BuildContextSBSv2))
+ return false;
+ final BuildContextSBSv2 other = (BuildContextSBSv2) obj;
+ if (sbsv2Alias == null) {
+ if (other.sbsv2Alias != null)
+ return false;
+ } else if (!sbsv2Alias.equals(other.sbsv2Alias))
+ 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;
+ }
+
}
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/ViewDataCache.java Wed Jun 02 18:27:30 2010 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/ViewDataCache.java Thu Jun 03 09:58:29 2010 -0500
@@ -299,7 +299,10 @@
if (DEBUG_VERBOSE) {
System.out.println("Found entry for " + key); //$NON-NLS-1$
}
- cacheHits.put(key, cacheHits.get(key) + 1);
+ if ((cacheHits.get(key) != null)){
+ cacheHits.put(key, cacheHits.get(key) + 1);
+ }
+
data = statefulData.second;
}
return data;