mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-16 20:55:44 +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();
|
IASTPreprocessorIncludeStatement[] includes = ast.getIncludeDirectives();
|
||||||
for (int i = 0; i < includes.length; ++i) {
|
for (int i = 0; i < includes.length; ++i) {
|
||||||
String incname = includes[i].getFileLocation().getFileName();
|
String incname = includes[i].getPath();
|
||||||
PDOMFile incfile = pdom.getFile(incname);
|
PDOMFile incfile = pdom.getFile(incname);
|
||||||
if (incfile != null)
|
if (incfile != null)
|
||||||
incfile.clear();
|
incfile.clear();
|
||||||
|
|
|
@ -65,6 +65,15 @@ public abstract class PDOMFullIndexerJob implements IPDOMIndexerTask {
|
||||||
|
|
||||||
pdom.acquireWriteLock();
|
pdom.acquireWriteLock();
|
||||||
try {
|
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);
|
addSymbols(tu.getLanguage(), ast);
|
||||||
} finally {
|
} finally {
|
||||||
pdom.releaseWriteLock();
|
pdom.releaseWriteLock();
|
||||||
|
|
Loading…
Add table
Reference in a new issue