1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 14:25:37 +02:00

[190010] fire finish event if finished or cancelled

This commit is contained in:
David McKnight 2007-07-13 18:20:16 +00:00
parent 6a25b7a149
commit b6e59543b3

View file

@ -29,11 +29,13 @@ public class OutputRefresh implements Runnable
{
private IHostSearchResultConfiguration searchConfig;
private boolean isDone = false;
private boolean isCancelled = false;
public OutputRefresh(IHostSearchResultConfiguration searchConfig)
{
this.searchConfig = searchConfig;
this.isDone = searchConfig.getStatus() == IHostSearchConstants.FINISHED;
this.isCancelled = searchConfig.getStatus() == IHostSearchConstants.CANCELLED;
}
public void run() {
@ -42,11 +44,14 @@ public class OutputRefresh implements Runnable
{
ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_REFRESH, null));
if (isDone)
if (isDone || isCancelled)
{
registry.fireEvent(new SystemResourceChangeEvent(searchConfig, ISystemResourceChangeEvents.EVENT_SEARCH_FINISHED, null));
}
}
}
}