mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 22:25:25 +02:00
Bug 145415 - Make sure we remove the symbols when files are indexed again.
This commit is contained in:
parent
76a9aa7233
commit
57950488d9
2 changed files with 10 additions and 1 deletions
|
@ -186,7 +186,7 @@ public class PDOMFullHandleDelta extends PDOMFullIndexerJob {
|
|||
|
||||
IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives();
|
||||
for (int i = 0; i < includes.length; ++i) {
|
||||
String incname = includes[i].getFileLocation().getFileName();
|
||||
String incname = includes[i].getPath();
|
||||
PDOMFile incfile = pdom.getFile(incname);
|
||||
if (incfile != null)
|
||||
incfile.clear();
|
||||
|
|
|
@ -65,6 +65,15 @@ public abstract class PDOMFullIndexerJob implements IPDOMIndexerTask {
|
|||
|
||||
pdom.acquireWriteLock();
|
||||
try {
|
||||
// First clear out the symbols in the includes
|
||||
IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives();
|
||||
for (int i = 0; i < includes.length; ++i) {
|
||||
String incname = includes[i].getPath();
|
||||
PDOMFile incfile = pdom.getFile(incname);
|
||||
if (incfile != null)
|
||||
incfile.clear();
|
||||
}
|
||||
|
||||
addSymbols(tu.getLanguage(), ast);
|
||||
} finally {
|
||||
pdom.releaseWriteLock();
|
||||
|
|
Loading…
Add table
Reference in a new issue