mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Fix for 68550: [Indexer] Cannot restart indexer by touching .c/.cpp/.cc files
This commit is contained in:
parent
1f83efa8bd
commit
1075c0ba5f
3 changed files with 14 additions and 6 deletions
|
@ -64,7 +64,7 @@ import org.w3c.dom.Node;
|
|||
public class IndexManager extends JobManager implements IIndexConstants {
|
||||
/* number of file contents in memory */
|
||||
public static int MAX_FILES_IN_MEMORY = 0;
|
||||
|
||||
|
||||
public IWorkspace workspace;
|
||||
public SimpleLookupTable indexNames = new SimpleLookupTable();
|
||||
private Map indexes = new HashMap(5);
|
||||
|
@ -166,9 +166,12 @@ public class IndexManager extends JobManager implements IIndexConstants {
|
|||
if (indexEnabled){
|
||||
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;
|
||||
|
||||
|
||||
if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) {
|
||||
// reduces the chance that the file is open later on, preventing it from being deleted
|
||||
if (!job.initializeContents()) return;
|
||||
|
|
|
@ -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
|
||||
Fix for 66695: [Indexer] Manually add an include path to a file/folder
|
||||
is ignored by indexer
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||
|
||||
|
||||
public abstract class JobManager implements Runnable {
|
||||
|
||||
/* queue of jobs to execute */
|
||||
|
@ -175,7 +175,7 @@ public abstract class JobManager implements Runnable {
|
|||
if( enabled == WAITING ){
|
||||
//stop waiting, restore the indexing Job for progress
|
||||
indexJob = new IndexingJob( thread, this );
|
||||
indexJob.setTicks( jobSet.size() );
|
||||
indexJob.setTicks(awaitingJobsCount());
|
||||
}
|
||||
enabled = ENABLED;
|
||||
if (VERBOSE)
|
||||
|
@ -409,8 +409,7 @@ public abstract class JobManager implements Runnable {
|
|||
//Put back into enabled state
|
||||
enable();
|
||||
}
|
||||
|
||||
if( enabledState() == ENABLED ){
|
||||
else if( enabledState() == ENABLED ){
|
||||
if( indexJob == null ){
|
||||
indexJob = new IndexingJob( thread, this );
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue