mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
When a file is deleted from the index, the file in the context of which
it was parsed should be marked as having unresolved includes.
This commit is contained in:
parent
c95730601b
commit
4753969951
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,7 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.index.IIndexFile;
|
||||
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
||||
import org.eclipse.cdt.core.index.IIndexInclude;
|
||||
import org.eclipse.cdt.core.index.IIndexLocationConverter;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.parser.ISignificantMacros;
|
||||
|
@ -171,6 +172,12 @@ public class WritablePDOM extends PDOM implements IWritableIndexFragment {
|
|||
IIndexFileLocation location = file.getLocation();
|
||||
PDOMFile pdomFile = (PDOMFile) file;
|
||||
pdomFile.clear();
|
||||
IIndexInclude include = pdomFile.getParsedInContext();
|
||||
if (include != null) {
|
||||
PDOMFile includedBy = (PDOMFile) include.getIncludedBy();
|
||||
if (includedBy.getTimestamp() > 0)
|
||||
getIndexOfFilesWithUnresolvedIncludes().insert(includedBy.getRecord());
|
||||
}
|
||||
|
||||
fEvent.fClearedFiles.add(location);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue