mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Delays traversal of project to indexer job
This commit is contained in:
parent
d5e1e3f2ea
commit
f60b2f1bb1
2 changed files with 15 additions and 6 deletions
|
@ -28,15 +28,20 @@ class PDOMFastReindex extends PDOMFastIndexerJob {
|
||||||
|
|
||||||
public PDOMFastReindex(PDOMFastIndexer indexer) throws CoreException {
|
public PDOMFastReindex(PDOMFastIndexer indexer) throws CoreException {
|
||||||
super(indexer);
|
super(indexer);
|
||||||
collectSources(indexer.getProject(), fTUs, fTUs);
|
fFilesToIndex= 1;
|
||||||
fFilesToIndex= fTUs.size()+1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(final IProgressMonitor monitor) {
|
public void run(final IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
setupIndexAndReaderFactory();
|
collectSources(indexer.getProject(), fTUs, fTUs);
|
||||||
|
fFilesToIndex= fTUs.size()+1;
|
||||||
|
|
||||||
|
if (fFilesToIndex == 1 || monitor.isCanceled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setupIndexAndReaderFactory();
|
||||||
clearIndex(index);
|
clearIndex(index);
|
||||||
registerTUsInReaderFactory(fTUs);
|
registerTUsInReaderFactory(fTUs);
|
||||||
fFilesToIndex--;
|
fFilesToIndex--;
|
||||||
|
|
|
@ -30,14 +30,18 @@ class PDOMFullReindex extends PDOMFullIndexerJob {
|
||||||
|
|
||||||
public PDOMFullReindex(PDOMFullIndexer indexer) throws CoreException {
|
public PDOMFullReindex(PDOMFullIndexer indexer) throws CoreException {
|
||||||
super(indexer);
|
super(indexer);
|
||||||
collectSources(indexer.getProject(), fTUs, fTUs);
|
fFilesToIndex= 1;
|
||||||
fFilesToIndex= fTUs.size() + 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run(final IProgressMonitor monitor) {
|
public void run(final IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
System.out.println(this);
|
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
|
collectSources(indexer.getProject(), fTUs, fTUs);
|
||||||
|
fFilesToIndex= fTUs.size()+1;
|
||||||
|
|
||||||
|
if (fFilesToIndex == 1 || monitor.isCanceled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setupIndexAndReaderFactory();
|
setupIndexAndReaderFactory();
|
||||||
clearIndex(index);
|
clearIndex(index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue