Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJeff Johnston2019-03-15 19:32:51 -0400
committerJeff Johnston2019-03-15 19:33:03 -0400
commit65d40fbacf6d0d868342b32db95c814e0c178460 (patch)
tree9c64b30fc4b8c993c7683f4c2bf284a4cd23fabe /core
parent02ecf97abed499e41ca80d74b280dd41c60cf0be (diff)
downloadorg.eclipse.cdt-65d40fbacf6d0d868342b32db95c814e0c178460.tar.gz
org.eclipse.cdt-65d40fbacf6d0d868342b32db95c814e0c178460.tar.xz
org.eclipse.cdt-65d40fbacf6d0d868342b32db95c814e0c178460.zip
Bug 545463 - Docker Build occasionally shows unknown includes in editor
- add checks in CBuildConfiguration so that a scanner info that has no include paths stored should be treated as no scanner info and the data should be fetched again Change-Id: I6820c56304aed568a58b6058145e912d71fa33c1
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
index 5dcb30c83b..d2582994fa 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
@@ -758,7 +758,7 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
synchronized (scannerInfoLock) {
info = scannerInfoCache.getScannerInfo(resource);
}
- if (info == null) {
+ if (info == null || info.getIncludePaths().length == 0) {
ICElement celement = CCorePlugin.getDefault().getCoreModel().create(resource);
if (celement instanceof ITranslationUnit) {
try {
@@ -927,6 +927,10 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
boolean hasCommand = true;
synchronized (scannerInfoLock) {
if (scannerInfoCache.hasCommand(commandStrings)) {
+ IExtendedScannerInfo info = scannerInfoCache.getScannerInfo(commandStrings);
+ if (info.getIncludePaths().length == 0) {
+ needScannerRefresh = true;
+ }
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
scannerInfoCache.addResource(commandStrings, resource);
infoChanged = true;
@@ -1053,6 +1057,10 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
boolean hasCommand = true;
synchronized (scannerInfoLock) {
if (scannerInfoCache.hasCommand(commandStrings)) {
+ IExtendedScannerInfo info = scannerInfoCache.getScannerInfo(commandStrings);
+ if (info.getIncludePaths().length == 0) {
+ needScannerRefresh = true;
+ }
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
scannerInfoCache.addResource(commandStrings, resource);
infoChanged = true;

Back to the top