1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 00:36:16 +02:00

Delays traversal of project to indexer job

This commit is contained in:
Markus Schorn 2006-11-06 13:17:58 +00:00
parent d5e1e3f2ea
commit f60b2f1bb1
2 changed files with 15 additions and 6 deletions

View file

@ -28,15 +28,20 @@ class PDOMFastReindex extends PDOMFastIndexerJob {
public PDOMFastReindex(PDOMFastIndexer indexer) throws CoreException {
super(indexer);
collectSources(indexer.getProject(), fTUs, fTUs);
fFilesToIndex= fTUs.size()+1;
fFilesToIndex= 1;
}
public void run(final IProgressMonitor monitor) {
try {
long start = System.currentTimeMillis();
setupIndexAndReaderFactory();
collectSources(indexer.getProject(), fTUs, fTUs);
fFilesToIndex= fTUs.size()+1;
if (fFilesToIndex == 1 || monitor.isCanceled()) {
return;
}
setupIndexAndReaderFactory();
clearIndex(index);
registerTUsInReaderFactory(fTUs);
fFilesToIndex--;

View file

@ -30,14 +30,18 @@ class PDOMFullReindex extends PDOMFullIndexerJob {
public PDOMFullReindex(PDOMFullIndexer indexer) throws CoreException {
super(indexer);
collectSources(indexer.getProject(), fTUs, fTUs);
fFilesToIndex= fTUs.size() + 1;
fFilesToIndex= 1;
}
public void run(final IProgressMonitor monitor) {
try {
System.out.println(this);
long start = System.currentTimeMillis();
collectSources(indexer.getProject(), fTUs, fTUs);
fFilesToIndex= fTUs.size()+1;
if (fFilesToIndex == 1 || monitor.isCanceled()) {
return;
}
setupIndexAndReaderFactory();
clearIndex(index);