1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-04 06:03:18 +02:00

[255390] don't assume one update means the search is done

This commit is contained in:
David McKnight 2008-12-04 18:00:14 +00:00
parent 91d6e55fa1
commit 377604c842

View file

@ -18,6 +18,7 @@
* David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup * David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
* David McKnight (IBM) - [214378] don't mark as finished until we have the results - sleep instead of wait * David McKnight (IBM) - [214378] don't mark as finished until we have the results - sleep instead of wait
* David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage() * David McKnight (IBM) - [216252] use SimpleSystemMessage instead of getMessage()
* David McKnight (IBM) - [255390] don't assume one update means the search is done
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.services.dstore.search; package org.eclipse.rse.internal.services.dstore.search;
@ -91,6 +92,8 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
try try
{ {
boolean working = true;
while (working){
getStatusMonitor(ds).waitForUpdate(status, monitor); getStatusMonitor(ds).waitForUpdate(status, monitor);
String statusStr = status.getName(); String statusStr = status.getName();
if (statusStr.equals("done")) //$NON-NLS-1$ if (statusStr.equals("done")) //$NON-NLS-1$
@ -108,10 +111,20 @@ public class DStoreSearchService extends AbstractDStoreService implements ISearc
} }
config.setStatus(IHostSearchConstants.FINISHED); config.setStatus(IHostSearchConstants.FINISHED);
} }
working = false;
} }
else if (statusStr.equals("cancelled")) //$NON-NLS-1$ else if (statusStr.equals("cancelled")) //$NON-NLS-1$
{ {
config.setStatus(IHostSearchConstants.CANCELLED); config.setStatus(IHostSearchConstants.CANCELLED);
working = false;
}
else if (statusStr.equals("working")){ //$NON-NLS-1$
// still searching
if (monitor.isCanceled()){
config.setStatus(IHostSearchConstants.CANCELLED);
working = false;
}
}
} }
} }
catch (Exception e) catch (Exception e)