Fix for Bug 11467; added automatic scan for changes in drive specs on project import/creation.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Mon Aug 30 14:17:20 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/ui/ManageConfigurationsDialog.java Mon Aug 30 14:24:59 2010 -0500
@@ -151,6 +151,7 @@
if (HostOS.IS_WIN32){
ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
+ ((SDKManager)sdkMgr).ensureSystemDrivesSynchronized();
if (!((SDKManager)sdkMgr).checkDevicesXMLSynchronized()){
if (sdkMgr instanceof ISDKManagerInternal){
ISDKManagerInternal sdkMgrInternal = (ISDKManagerInternal)sdkMgr;
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Aug 30 14:17:20 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Aug 30 14:24:59 2010 -0500
@@ -61,6 +61,8 @@
private static final String MIFCONV_FILE = "epoc32/tools/mifconv" + HostOS.EXE_EXT; //$NON-NLS-1$
private static final String ABLD_FILE = "epoc32/tools/abld.pl"; //$NON-NLS-1$
private static final long VALID_ABLD_SIZE = 1024;
+
+ private File[] systemDrives;
static boolean hasPromptedForDevicesXML = false; // make sure we only ask once at startup if devices.xml does not exist
long devicesXLMLastModified;
@@ -366,6 +368,14 @@
}
}
+ public void ensureSystemDrivesSynchronized() {
+ if (HostOS.IS_WIN32) {
+ if (systemDrives != null && getSystemDrives().length > systemDrives.length) {
+ scanSDKs();
+ }
+ }
+ }
+
@Override
protected boolean isEPOCRootFixed() {
return true;
@@ -375,7 +385,7 @@
* Scan system drives for installed SDKs
*/
protected void doScanDrives(IProgressMonitor monitor) {
- File[] drives = getSystemDrives();
+ File[] drives = systemDrives = getSystemDrives();
monitor.beginTask("Scanning system drives for installed SDKs", drives.length);
for (File drive : drives) {
if (!isEPOCRoot(drive)) {
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfImportWizard.java Mon Aug 30 14:17:20 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/importWizards/BldInfImportWizard.java Mon Aug 30 14:24:59 2010 -0500
@@ -71,6 +71,7 @@
ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
if (HostOS.IS_WIN32){
+ ((SDKManager)sdkMgr).ensureSystemDrivesSynchronized();
if (!((SDKManager)sdkMgr).checkDevicesXMLSynchronized()){
if (sdkMgr instanceof ISDKManagerInternal){
ISDKManagerInternal sdkMgrInternal = (ISDKManagerInternal)sdkMgr;
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/wizards/NewSymbianOSCppProjectWizard.java Mon Aug 30 14:17:20 2010 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/wizards/NewSymbianOSCppProjectWizard.java Mon Aug 30 14:24:59 2010 -0500
@@ -55,6 +55,7 @@
if (HostOS.IS_WIN32){
ISDKManager sdkMgr = SDKCorePlugin.getSDKManager();
+ ((SDKManager)sdkMgr).ensureSystemDrivesSynchronized();
if (!((SDKManager)sdkMgr).checkDevicesXMLSynchronized()){
if (sdkMgr instanceof ISDKManagerInternal){
ISDKManagerInternal sdkMgrInternal = (ISDKManagerInternal)sdkMgr;