Source:
public void resourceChanged(final IResourceChangeEvent event) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true); if (markerDeltas == null) { return; } int oldTotal = totalMarkerCount; final List additions = new ArrayList(); final List removals = new ArrayList(); final List changes = new ArrayList(); for (IMarkerDelta markerDelta : markerDeltas) { if (markerDelta == null) { continue; } int iKind = markerDelta.getKind(); for (String element : TasksFilter.ROOT_TYPES) { if (markerDelta.isSubtypeOf(element)) { if (totalMarkerCount != -1) { switch (iKind) { case IResourceDelta.ADDED: totalMarkerCount++; break; case IResourceDelta.REMOVED: totalMarkerCount--; break; } } IResource resource = markerDelta.getResource(); if (resource == null) { continue; } boolean affectedBy = taskList.checkResource(resource) && taskList.getFilter().select(markerDelta); if (affectedBy) { IMarker marker = markerDelta.getMarker(); switch (iKind) { case IResourceDelta.ADDED: additions.add(marker); updateMarkerCounts(markerDelta, +1); break; case IResourceDelta.REMOVED: removals.add(marker); updateMarkerCounts(markerDelta, -1); break; case IResourceDelta.CHANGED: changes.add(marker); break; } } break; } } } if (oldTotal == totalMarkerCount && additions.size() + removals.size() + changes.size() == 0) { return; } viewer.getControl().getDisplay().syncExec(() -> { if (getFilterOnMarkerLimit() && sum(visibleMarkerCounts) > getMarkerLimit()) { if (!isMarkerLimitExceeded()) { setMarkerLimitExceeded(true); viewer.refresh(); } } else if (taskList.isMarkerLimitExceeded()) { setMarkerLimitExceeded(false); viewer.refresh(); } else { updateViewer(additions, removals, changes); } taskList.markersChanged(); }); }

Target:
public void resourceChanged(final IResourceChangeEvent event) { IMarkerDelta[] markerDeltas = event.findMarkerDeltas(null, true); if (markerDeltas == null) { return; } int oldTotal = totalMarkerCount; final List additions = new ArrayList(); final List removals = new ArrayList(); final List changes = new ArrayList(); for (IMarkerDelta markerDelta : markerDeltas) { if (markerDelta == null) { continue; } int iKind = markerDelta.getKind(); for (String rootType : TasksFilter.ROOT_TYPES) { if (markerDelta.isSubtypeOf(rootType)) { if (totalMarkerCount != -1) { switch (iKind) { case IResourceDelta.ADDED: totalMarkerCount++; break; case IResourceDelta.REMOVED: totalMarkerCount--; break; } } IResource resource = markerDelta.getResource(); if (resource == null) { continue; } boolean affectedBy = taskList.checkResource(resource) && taskList.getFilter().select(markerDelta); if (affectedBy) { IMarker marker = markerDelta.getMarker(); switch (iKind) { case IResourceDelta.ADDED: additions.add(marker); updateMarkerCounts(markerDelta, +1); break; case IResourceDelta.REMOVED: removals.add(marker); updateMarkerCounts(markerDelta, -1); break; case IResourceDelta.CHANGED: changes.add(marker); break; } } break; } } } if (oldTotal == totalMarkerCount && additions.size() + removals.size() + changes.size() == 0) { return; } viewer.getControl().getDisplay().syncExec(() -> { if (getFilterOnMarkerLimit() && sum(visibleMarkerCounts) > getMarkerLimit()) { if (!isMarkerLimitExceeded()) { setMarkerLimitExceeded(true); viewer.refresh(); } } else if (taskList.isMarkerLimitExceeded()) { setMarkerLimitExceeded(false); viewer.refresh(); } else { updateViewer(additions, removals, changes); } taskList.markersChanged(); }); }