Skip to content
Snippets Groups Projects
Commit 28e2c415 authored by Simon Barner's avatar Simon Barner
Browse files

- Handle cancellation requests in while() loop handling list of elements to be refreshed.

- Avoids error "Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown" found when investigating #2511. More precisely, the error is triggered after open all 3 deployments, when AF3 is closed while the MarkerService has not finished yet.
refs 2511
parent 51b6be16
No related branches found
No related tags found
No related merge requests found
......@@ -52,7 +52,7 @@ import org.fortiss.tooling.kernel.ui.service.IMarkerService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: C6F05FD1064BC3906A9B370FD7A86DA6
* @ConQAT.Rating YELLOW Hash: EA3CCA4A0C6BD17680255C1E8B2EF742
*/
public class MarkerService implements IMarkerService, IPersistencyServiceListener {
......@@ -97,6 +97,9 @@ public class MarkerService implements IMarkerService, IPersistencyServiceListene
toBeRefreshed = invalidElements.remove(0);
}
while(toBeRefreshed != null) {
if(monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
refreshMarkers(toBeRefreshed);
// get next element to be refreshed
synchronized(invalidElements) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment