Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2006-06-07 18:49:33 +0000
committerDoug Schaefer2006-06-07 18:49:33 +0000
commit57950488d947dcdca19ae6908e7b55888134d649 (patch)
tree3a8fc1739971e1a311ce18f424d18970f4451702
parent76a9aa72333e3f567ed03aa45b95ac4cf5b230a7 (diff)
downloadorg.eclipse.cdt-57950488d947dcdca19ae6908e7b55888134d649.tar.gz
org.eclipse.cdt-57950488d947dcdca19ae6908e7b55888134d649.tar.xz
org.eclipse.cdt-57950488d947dcdca19ae6908e7b55888134d649.zip
Bug 145415 - Make sure we remove the symbols when files are indexed again.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullHandleDelta.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java9
2 files changed, 10 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullHandleDelta.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullHandleDelta.java
index 9e5ff642a3..33bca5e628 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullHandleDelta.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullHandleDelta.java
@@ -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();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java
index a8463a0f26..f0eb7303b9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java
@@ -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();

Back to the top