# HG changeset patch # User timkelly # Date 1283895098 18000 # Node ID 69011681f445626f8651a5646e4dabf2f01d1164 # Parent 37285903ed510b4f11d36cd970c1053fdf62f8e2 merge some changes from C3_BUILDER_WORK to default for better SDK scanning when the SDKManager is loaded. diff -r 37285903ed51 -r 69011681f445 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Sun Sep 05 13:42:22 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/AbstractSDKManager.java Tue Sep 07 16:31:38 2010 -0500 @@ -112,24 +112,36 @@ public void awake(IJobChangeEvent event) {} public void aboutToRun(IJobChangeEvent event) {} public void done(IJobChangeEvent event) { - fireInstalledSdkChanged(SDKChangeEventType.eSDKScanned); // Notify any plugins that want to know if the SDKManager has scanned plugins. if (!sdkHookExtenstionsNotified) { notifySDKManagerLoaded(); sdkHookExtenstionsNotified = true; } + fireInstalledSdkChanged(SDKChangeEventType.eSDKScanned); } }; + /** + * Must call init() after construction + */ public AbstractSDKManager() { + } + + /** + * Initialize the AbastractSDKManager for first use. + * Longer running tasks can be done here that should be avoided in the constructor + * in the case of multiple requesting the SDKManager, which is a singleton object. + */ + public void init(){ macroStore = SymbianMacroStore.getInstance(); - scanJob = new Job ("Scan for installed SDKs") { + scanJob = new Job ("Building Symbian SDK cache...") { @Override protected IStatus run(IProgressMonitor monitor) { return handleScan(monitor); } }; + scanSDKs(); addScanJobListner(scanJobListener); } @@ -141,6 +153,7 @@ SBSv2QueryUtils.removeAllCachedQueries(); // do the real sdk scanning in a job. if (scanJob.getState() == Job.NONE) { + scanJob.setUser(true); scanJob.schedule(); } } @@ -192,6 +205,7 @@ if (monitor.isCanceled()) { return Status.CANCEL_STATUS; } + return Status.OK_STATUS; } diff -r 37285903ed51 -r 69011681f445 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java Sun Sep 05 13:42:22 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/SDKCorePlugin.java Tue Sep 07 16:31:38 2010 -0500 @@ -16,6 +16,7 @@ import org.osgi.framework.BundleContext; import com.nokia.carbide.cpp.internal.api.sdk.SDKCacheUtils; +import com.nokia.carbide.cpp.internal.sdk.core.model.AbstractSDKManager; import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManager; import com.nokia.carbide.cpp.internal.sdk.core.model.SDKManagerRaptorOnly; import com.nokia.cpp.internal.api.utils.core.HostOS; @@ -93,6 +94,9 @@ sdkManager = new SDKManager(); else sdkManager = new SDKManagerRaptorOnly(); + + ((AbstractSDKManager)sdkManager).init(); + } return sdkManager; } diff -r 37285903ed51 -r 69011681f445 qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtSDKUtils.java --- a/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtSDKUtils.java Sun Sep 05 13:42:22 2010 -0500 +++ b/qt/com.nokia.carbide.cpp.qt.core/src/com/nokia/carbide/cpp/internal/qt/core/QtSDKUtils.java Tue Sep 07 16:31:38 2010 -0500 @@ -131,7 +131,7 @@ refreshQtStoredSDKs(); if ((getQtSDKNameForSymbianSDK(sdk) == null) && isQtInternallyInstalled(sdk)){ addQtSDK(sdk.getUniqueId(), getQmakeInstallationPath(sdk), getQtIncludeDirectory(sdk), makeDefault); - } + } } /**