1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-14 11:45:38 +02:00

Fix for 68550: [Indexer] Cannot restart indexer by touching .c/.cpp/.cc files

This commit is contained in:
Bogdan Gheorghe 2004-06-25 19:02:11 +00:00
parent 1f83efa8bd
commit 1075c0ba5f
3 changed files with 14 additions and 6 deletions

View file

@ -166,9 +166,12 @@ public class IndexManager extends JobManager implements IIndexConstants {
if (indexEnabled){ if (indexEnabled){
AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this); AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this);
if (!jobSet.add(job.resource.getLocation())) //If we are in WAITING mode, we need to kick ourselves into enablement
if (!jobSet.add(job.resource.getLocation()) &&
enabledState()==ENABLED)
return; return;
if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) { if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) {
// reduces the chance that the file is open later on, preventing it from being deleted // reduces the chance that the file is open later on, preventing it from being deleted
if (!job.initializeContents()) return; if (!job.initializeContents()) return;

View file

@ -1,3 +1,9 @@
2004-06-25 Bogdan Gheorghe
Fix for 68550: [Indexer] Cannot restart indexer by touching .c/.cpp/.cc files
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
2004-06-24 Bogdan Gheorghe 2004-06-24 Bogdan Gheorghe
Fix for 66695: [Indexer] Manually add an include path to a file/folder Fix for 66695: [Indexer] Manually add an include path to a file/folder
is ignored by indexer is ignored by indexer

View file

@ -175,7 +175,7 @@ public abstract class JobManager implements Runnable {
if( enabled == WAITING ){ if( enabled == WAITING ){
//stop waiting, restore the indexing Job for progress //stop waiting, restore the indexing Job for progress
indexJob = new IndexingJob( thread, this ); indexJob = new IndexingJob( thread, this );
indexJob.setTicks( jobSet.size() ); indexJob.setTicks(awaitingJobsCount());
} }
enabled = ENABLED; enabled = ENABLED;
if (VERBOSE) if (VERBOSE)
@ -409,8 +409,7 @@ public abstract class JobManager implements Runnable {
//Put back into enabled state //Put back into enabled state
enable(); enable();
} }
else if( enabledState() == ENABLED ){
if( enabledState() == ENABLED ){
if( indexJob == null ){ if( indexJob == null ){
indexJob = new IndexingJob( thread, this ); indexJob = new IndexingJob( thread, this );
} else { } else {