Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2011-09-19 19:18:35 +0000
committerJohn Cortell2011-09-19 19:18:35 +0000
commitdabef579a2a28361bbb6278a5c71a2afc25b1d0e (patch)
tree70f496e832e8fc0f57fbc45ae2ca4139f686fa7c
parentc686b86ceb077575d074fe2249dab50143e0ccbb (diff)
downloadorg.eclipse.cdt-dabef579a2a28361bbb6278a5c71a2afc25b1d0e.tar.gz
org.eclipse.cdt-dabef579a2a28361bbb6278a5c71a2afc25b1d0e.tar.xz
org.eclipse.cdt-dabef579a2a28361bbb6278a5c71a2afc25b1d0e.zip
Bug 354194 - My previous fix accidentally prevented the creation of the config info map entry for the project root folder, thus scanner discovery preferences were no longer being persisted. This adjustment adds an exeption for that rcinfo.
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
index 5f04bca0b9..9f5b640dfb 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig2/CfgScannerConfigInfoFactory2.java
@@ -37,6 +37,7 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.cdt.managedbuilder.internal.dataprovider.BuildConfigurationData;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.QualifiedName;
@@ -193,7 +194,8 @@ public class CfgScannerConfigInfoFactory2 {
info = configMap.get(superContext);
}
- // Files with custom properties don't have a persisted entry in the config
+ // Scanner discovery options aren't settable on a file-per-file basis. Thus
+ // files with custom properties don't have a persisted entry in the config
// info map; we create an ephemeral entry instead. We need to assign that file
// the scanner profile that's used for non-custom files of the same
// inputType/tool (and configuration, of course). Unfortunately, identifying
@@ -231,8 +233,13 @@ public class CfgScannerConfigInfoFactory2 {
// permanent and stagnant part of the project description. It was
// added to the container only so we could obtain an
// IScannerConfigBuilderInfo2. Now that we have the info object,
- // revert the container. See Bug 354194
- container.removeInfo(context.toInfoContext());
+ // revert the container. See Bug 354194. Note that the permanent
+ // entry for the project's root folder resource info gets created
+ // by us shortly after project creation; thus we have to make an
+ // exception for that rcinfo.
+ if (!(rcInfo instanceof IFolderInfo && rcInfo.getPath().isEmpty())) {
+ container.removeInfo(context.toInfoContext());
+ }
}
if(info != null){
map.put(context, info);

Back to the top