merge some changes from C3_BUILDER_WORK to default for better SDK scanning when the SDKManager is loaded.
--- 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;
}
--- 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;
}
--- 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);
- }
+ }
}
/**