# HG changeset patch # User fturovic # Date 1246483430 18000 # Node ID 82c247e583d43d3ee3807da2a7838be356f813c0 # Parent 9d9aecf552eeba27fa37add3bf60c8dffbc2ff7c# Parent 334622dd92836c1a146baf27bc2ef9251132ac4f merge tims changes diff -r 9d9aecf552ee -r 82c247e583d4 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SymbianBuildContext.java --- 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 macros = new ArrayList(); Map namedMacros = new HashMap(); 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 diff -r 9d9aecf552ee -r 82c247e583d4 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java --- 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); diff -r 9d9aecf552ee -r 82c247e583d4 project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/ISBVViewRunnable.java --- 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.