Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMike Kucera2009-07-29 14:57:25 -0400
committerMike Kucera2009-07-29 14:57:25 -0400
commit430ade05ba786296419d5e073e7793ece745c55b (patch)
treec5f97d5a75a3d32fb34ff34a9b7de5a1a60bcd19 /core
parent36237325e2d13950f76a8a87dad1a23baf7bb4d3 (diff)
downloadorg.eclipse.cdt-430ade05ba786296419d5e073e7793ece745c55b.tar.gz
org.eclipse.cdt-430ade05ba786296419d5e073e7793ece745c55b.tar.xz
org.eclipse.cdt-430ade05ba786296419d5e073e7793ece745c55b.zip
Bug 285052 - standalone index needs an ASTFilePathResolver
Diffstat (limited to 'core')
-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 85a54be9b2..a85cc65465 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
@@ -23,8 +23,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;
@@ -174,6 +176,8 @@ public abstract class StandaloneIndexer {
fLog = log;
fScanner = scanner;
fScannerInfoProvider = null;
+
+ setupASTFilePathResolver();
}
@@ -185,9 +189,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