mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-19 15:05:36 +02:00
Bug 285052 - standalone index needs an ASTFilePathResolver
This commit is contained in:
parent
6e49965be4
commit
c99de759a9
1 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue