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:
parent
f909efeb3c
commit
db5fe28b4e
3 changed files with 16 additions and 3 deletions
|
@ -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
|
2004-05-17 Bogdan Gheorghe
|
||||||
Added matching routine to IncludePattern
|
Added matching routine to IncludePattern
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class IndexingJob extends Job {
|
||||||
ticks++;
|
ticks++;
|
||||||
if( ticks > maxTicks )
|
if( ticks > maxTicks )
|
||||||
maxTicks = ticks;
|
maxTicks = ticks;
|
||||||
updateRemainingCount( "" ); //$NON-NLS-1$
|
updateRemainingCount( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTicks( int n ){
|
public void setTicks( int n ){
|
||||||
|
@ -67,7 +67,7 @@ public class IndexingJob extends Job {
|
||||||
maxTicks = ticks;
|
maxTicks = ticks;
|
||||||
|
|
||||||
updatePercentage();
|
updatePercentage();
|
||||||
updateRemainingCount( "" ); //$NON-NLS-1$
|
updateRemainingCount( null );
|
||||||
}
|
}
|
||||||
|
|
||||||
public int tickDown( String str ){
|
public int tickDown( String str ){
|
||||||
|
@ -87,7 +87,8 @@ public class IndexingJob extends Job {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String taskString = Util.bind("manager.filesToIndex", Integer.toString(ticks)); //$NON-NLS-1$
|
String taskString = Util.bind("manager.filesToIndex", Integer.toString(ticks)); //$NON-NLS-1$
|
||||||
taskString += str;
|
if( str != null )
|
||||||
|
taskString += str;
|
||||||
progressMonitor.subTask( taskString );
|
progressMonitor.subTask( taskString );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,12 @@ public abstract class JobManager implements Runnable {
|
||||||
if (VERBOSE)
|
if (VERBOSE)
|
||||||
JobManager.verbose("-> discarding background job - " + currentJob); //$NON-NLS-1$
|
JobManager.verbose("-> discarding background job - " + currentJob); //$NON-NLS-1$
|
||||||
currentJob.cancel();
|
currentJob.cancel();
|
||||||
|
if( indexJob != null ){
|
||||||
|
if( indexJob.tickDown( null ) == 0 ){
|
||||||
|
indexJob.done( OK_STATUS );
|
||||||
|
indexJob = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jobStart = 0;
|
jobStart = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue