1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

fix bug 62651

This commit is contained in:
Andrew Niefer 2004-05-18 19:20:23 +00:00
parent f909efeb3c
commit db5fe28b4e
3 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2004-05-18 Andrew Niefer
bug 62651 - indexer job hangs if project deleted from workspace
When we discard jobs, we must downtick the indexing job as well.
* search/org/eclipse/cdt/internal/core/search/processing/IndexingJob.java
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
2004-05-17 Bogdan Gheorghe
Added matching routine to IncludePattern

View file

@ -58,7 +58,7 @@ public class IndexingJob extends Job {
ticks++;
if( ticks > maxTicks )
maxTicks = ticks;
updateRemainingCount( "" ); //$NON-NLS-1$
updateRemainingCount( null );
}
public void setTicks( int n ){
@ -67,7 +67,7 @@ public class IndexingJob extends Job {
maxTicks = ticks;
updatePercentage();
updateRemainingCount( "" ); //$NON-NLS-1$
updateRemainingCount( null );
}
public int tickDown( String str ){
@ -87,7 +87,8 @@ public class IndexingJob extends Job {
return;
String taskString = Util.bind("manager.filesToIndex", Integer.toString(ticks)); //$NON-NLS-1$
taskString += str;
if( str != null )
taskString += str;
progressMonitor.subTask( taskString );
}

View file

@ -142,6 +142,12 @@ public abstract class JobManager implements Runnable {
if (VERBOSE)
JobManager.verbose("-> discarding background job - " + currentJob); //$NON-NLS-1$
currentJob.cancel();
if( indexJob != null ){
if( indexJob.tickDown( null ) == 0 ){
indexJob.done( OK_STATUS );
indexJob = null;
}
}
}
}
jobStart = 0;