Bug 12078: revert part of change that means mmp/bld.inf changes never rebuild the indexer (duh). Just avoid rebuilding before we've even read the cache to begin with -- this was the real bug.
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java Wed Sep 15 16:56:50 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java Wed Sep 15 17:28:48 2010 -0500
@@ -338,8 +338,6 @@
Set<IPath> pathList = new HashSet<IPath>();
for (ICarbideBuildConfiguration config : cpi.getBuildConfigurations()) {
- // Bug 12078: I see no reason for this in C3 -- it always happens on startup and obviates the cache
- /*
// force a rebuild of the CarbideLanguageData cache
// TODO PERFORMANCE EJS: why??? We end up forcing a cache rebuild even when you just switch configurations...
CLanguageData languageData = null;
@@ -362,7 +360,6 @@
}
}
}
- */
EpocEngineHelper.addIncludedFilesFromBldInf(cpi, config, cpi.getAbsoluteBldInfPath(), pathList);
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Wed Sep 15 16:56:50 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java Wed Sep 15 17:28:48 2010 -0500
@@ -154,7 +154,7 @@
// But we must save the cache in a workspace job because this code
// is usually called when the project description is being read for
// the first time (thus saving just throws an exception).
- Job job = new Job("Saving Carbide indexer cache for " + carbideBuildConfig.getDisplayString()) {
+ Job job = new Job("Saving Carbide indexer cache for " + carbideBuildConfig.toString()) {
@Override
protected IStatus run(IProgressMonitor monitor) {
@@ -524,7 +524,11 @@
}
public void forceRebuildCache() {
- forceRebuildCache = true;
+ // only force rebuild if there was something loaded already --
+ // we get here on startup too when first hooking up resource listeners
+ if (includeEntries != null && macroEntries != null && cacheFileSource != null) {
+ forceRebuildCache = true;
+ }
}
@Override