Fix for Bug 12112, now SDK cache get scanned first and SDK cache entries are always kept during rescanning.
authorstechong
Thu, 16 Sep 2010 13:49:36 -0500
changeset 2033 018bd04fe39c
parent 2032 a503dd2537d9
child 2034 8ca82bbe1973
Fix for Bug 12112, now SDK cache get scanned first and SDK cache entries are always kept during rescanning.
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java
core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java	Thu Sep 16 12:28:20 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java	Thu Sep 16 13:49:36 2010 -0500
@@ -331,9 +331,6 @@
 				sdk = SymbianSDKFactory.createInstance(id, 
 						   entry.getEpocRoot(),
 						   osVersion);
-				if (isInSDKList(sdk)) {
-					continue;
-				}
 				((SymbianSDK)sdk).setEnabled(entry.isEnabled());
 				synchronized (sdkList) {
 					sdkList.add(sdk);
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java	Thu Sep 16 12:28:20 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java	Thu Sep 16 13:49:36 2010 -0500
@@ -83,6 +83,7 @@
 	
 	protected boolean doScanSDKs(IProgressMonitor monitor) {
 		boolean result = true;
+		scanCarbideSDKCache();
 		DevicesType devicesType;
 		try {
 			File devicesFile = getDevicesXMLFile();
@@ -108,7 +109,6 @@
 			result = false;
 		}
 
-		scanCarbideSDKCache();
 		doScanDrives(monitor);
 		return result;
 	}
@@ -490,7 +490,9 @@
 	@Override
 	protected boolean isInSDKList(ISymbianSDK sdk) {
 		for (ISymbianSDK entry : sdkList) {
-			if (entry.getEPOCROOT().equalsIgnoreCase(sdk.getEPOCROOT())) {
+			File f1 = new File(entry.getEPOCROOT());
+			File f2 = new File(sdk.getEPOCROOT());
+			if (f1.equals(f2)) {
 				return true;
 			}
 		}