Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2009-07-29 14:49:22 -0400
committerMike Kucera2009-07-29 14:49:22 -0400
commit8e87278bf3b4782777e5c72b25543cfc57ef900e (patch)
tree8da61d99114d73c0b9e885cf492bcbd686f2a282
parent60bf3e9bd36c5accb3d58ce3258de56389d871b3 (diff)
downloadorg.eclipse.cdt-200907291638.tar.gz
org.eclipse.cdt-200907291638.tar.xz
org.eclipse.cdt-200907291638.zip
Bug 285052 - standalone index needs an ASTFilePathResolverv200907291638
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
index dc0f3a16cc..05238ed50e 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexer.java
@@ -24,8 +24,10 @@ import java.util.Set;
import org.eclipse.cdt.core.parser.IParserLogService;
import org.eclipse.cdt.core.parser.IScannerInfo;
import org.eclipse.cdt.internal.core.index.IWritableIndex;
+import org.eclipse.cdt.internal.core.index.IWritableIndexFragment;
import org.eclipse.cdt.internal.core.pdom.IndexerProgress;
import org.eclipse.cdt.internal.core.pdom.PDOMWriter;
+import org.eclipse.cdt.internal.core.pdom.WritablePDOM;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -172,6 +174,8 @@ public abstract class StandaloneIndexer {
fLog = log;
fScanner = scanner;
fScannerInfoProvider = null;
+
+ setupASTFilePathResolver();
}
@@ -183,9 +187,19 @@ public abstract class StandaloneIndexer {
fLog = log;
fScanner = null;
fScannerInfoProvider = scannerProvider;
+
+ setupASTFilePathResolver();
+ }
+
+
+ private void setupASTFilePathResolver() {
+ IWritableIndexFragment fragment = getIndex().getWritableFragment();
+ if(fragment instanceof WritablePDOM) {
+ WritablePDOM pdom = (WritablePDOM)fragment;
+ pdom.setASTFilePathResolver(new StandaloneIndexerInputAdapter(this));
+ }
}
-
public void setScannerInfoProvider(IStandaloneScannerInfoProvider provider) {
fScannerInfoProvider = provider;
fScanner = null;

Back to the top