mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-03 13:43:31 +02:00
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
This commit is contained in:
parent
02ecf97abe
commit
65d40fbacf
1 changed files with 9 additions and 1 deletions
|
@ -758,7 +758,7 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
|
||||||
synchronized (scannerInfoLock) {
|
synchronized (scannerInfoLock) {
|
||||||
info = scannerInfoCache.getScannerInfo(resource);
|
info = scannerInfoCache.getScannerInfo(resource);
|
||||||
}
|
}
|
||||||
if (info == null) {
|
if (info == null || info.getIncludePaths().length == 0) {
|
||||||
ICElement celement = CCorePlugin.getDefault().getCoreModel().create(resource);
|
ICElement celement = CCorePlugin.getDefault().getCoreModel().create(resource);
|
||||||
if (celement instanceof ITranslationUnit) {
|
if (celement instanceof ITranslationUnit) {
|
||||||
try {
|
try {
|
||||||
|
@ -927,6 +927,10 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
|
||||||
boolean hasCommand = true;
|
boolean hasCommand = true;
|
||||||
synchronized (scannerInfoLock) {
|
synchronized (scannerInfoLock) {
|
||||||
if (scannerInfoCache.hasCommand(commandStrings)) {
|
if (scannerInfoCache.hasCommand(commandStrings)) {
|
||||||
|
IExtendedScannerInfo info = scannerInfoCache.getScannerInfo(commandStrings);
|
||||||
|
if (info.getIncludePaths().length == 0) {
|
||||||
|
needScannerRefresh = true;
|
||||||
|
}
|
||||||
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
|
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
|
||||||
scannerInfoCache.addResource(commandStrings, resource);
|
scannerInfoCache.addResource(commandStrings, resource);
|
||||||
infoChanged = true;
|
infoChanged = true;
|
||||||
|
@ -1053,6 +1057,10 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
|
||||||
boolean hasCommand = true;
|
boolean hasCommand = true;
|
||||||
synchronized (scannerInfoLock) {
|
synchronized (scannerInfoLock) {
|
||||||
if (scannerInfoCache.hasCommand(commandStrings)) {
|
if (scannerInfoCache.hasCommand(commandStrings)) {
|
||||||
|
IExtendedScannerInfo info = scannerInfoCache.getScannerInfo(commandStrings);
|
||||||
|
if (info.getIncludePaths().length == 0) {
|
||||||
|
needScannerRefresh = true;
|
||||||
|
}
|
||||||
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
|
if (!scannerInfoCache.hasResource(commandStrings, resource)) {
|
||||||
scannerInfoCache.addResource(commandStrings, resource);
|
scannerInfoCache.addResource(commandStrings, resource);
|
||||||
infoChanged = true;
|
infoChanged = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue