merge tims changes
authorfturovic <frank.turovich@nokia.com>
Wed, 01 Jul 2009 16:23:50 -0500
changeset 346 82c247e583d4
parent 345 9d9aecf552ee (current diff)
parent 343 334622dd9283 (diff)
child 348 c94ed1efeb2c
merge tims changes
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java	Wed Jul 01 16:23:00 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java	Wed Jul 01 16:23:50 2009 -0500
@@ -21,6 +21,7 @@
 import com.nokia.carbide.cpp.epoc.engine.model.sbv.ISBVView;
 import com.nokia.carbide.cpp.epoc.engine.preprocessor.*;
 import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianMissingSDKFactory;
+import com.nokia.carbide.cpp.internal.sdk.core.model.SymbianSDK;
 import com.nokia.carbide.cpp.sdk.core.*;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.BasicIncludeFileLocator;
 import com.nokia.carbide.internal.api.cpp.epoc.engine.preprocessor.MacroScanner;
@@ -378,6 +379,17 @@
 				List<IDefine> macros = new ArrayList<IDefine>();
 				Map<String, IDefine> namedMacros = new HashMap<String, IDefine>();
 				File prefixFile = getSDK().getPrefixFile();
+				
+				if (prefixFile == null){
+					// Check that the prefix file may have become available since the SDK was scanned last.
+					// This can happen, for e.g., if the user opens the IDE _then_ does a subst on a drive that already has an SDK entry.
+					IPath prefixCheck = ((SymbianSDK)getSDK()).getPrefixFromVariantCfg();
+					if (prefixCheck != null){
+						prefixFile = prefixCheck.toFile();
+						getSDK().setPrefixFile(prefixCheck);
+					}
+				}
+				
 				if (prefixFile != null) {
 
 					// add any BSF/SBV includes so the headers are picked up from the correct location
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java	Wed Jul 01 16:23:00 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java	Wed Jul 01 16:23:50 2009 -0500
@@ -1071,7 +1071,7 @@
 	 * Get the full path to the prefix file defined under \epoc32\tools\variant\variant.cfg
 	 * @return A path object, or null if the variant.cfg does not exist. This routine does not check to see if the returned path exists.
 	 */
-	protected IPath getPrefixFromVariantCfg(){
+	public IPath getPrefixFromVariantCfg(){
 		File epocRoot = new File(getEPOCROOT());
 		File variantCfg;
 		variantCfg = new File(epocRoot, SPP_VARIANT_CFG_FILE);
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/ISBVViewRunnable.java	Wed Jul 01 16:23:00 2009 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/ISBVViewRunnable.java	Wed Jul 01 16:23:50 2009 -0500
@@ -21,7 +21,7 @@
 import com.nokia.carbide.cpp.epoc.engine.model.sbv.ISBVView;
 
 /**
- * Instantiate this interface and pass to EpocEnginePlugin#runWithSBVView()
+ * Pass this interface to EpocEnginePlugin#runWithSBVView()
  * to encapsulate some of the bookkeeping of model/view handling. 
  *
  * @noimplement This interface is not intended to be implemented by clients.