Source:
<code>public synchronized void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Multimap<@NonNull String, @NonNull Object>>> predicates = generateRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { Multimap<@NonNull String, @NonNull Object> input = ISegmentStoreProvider.getFilterInput(provider, segment); boolean activateProperty = false; for (Map.Entry<Integer, Predicate<Multimap<String, Object>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Multimap<String, Object>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED || property == IFilterProperty.EXCLUDE) { boolean status = value.test(input); activateProperty |= status; } } return activateProperty; }; if (segStore != null) { if (predicates.isEmpty()) { updateModel(segStore); return; } Job job = fFilteringJob; if (job != null) { job.cancel(); <START> } <END> job = new Job(Messages.SegmentStoreTableViewer_FilteringData) { @Override protected IStatus run(@Nullable IProgressMonitor monitor) { SubMonitor subMonitor = SubMonitor.convert(monitor); ISegmentStore<ISegment> filteredStore = new ArrayListStore<>(); for (ISegment segment : segStore) { if (subMonitor.isCanceled()) { return Status.CANCEL_STATUS; } if (predicate.test(segment)) { filteredStore.add(segment); } } if (subMonitor.isCanceled()) { return Status.CANCEL_STATUS; } updateModel(filteredStore); return Status.OK_STATUS; } }; fFilteringJob = job; job.schedule(); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }</code><technical_language>filtering job cancelled, if new data segment store predicates</technical_language>

Target:
public synchronized void setData(@Nullable ISegmentStoreProvider provider) { fSegmentProvider = provider; if (provider == null) { updateModel(null); return; } createProviderColumns(); ISegmentStore<ISegment> segStore = provider.getSegmentStore(); Map<@NonNull Integer, @NonNull Predicate<@NonNull Multimap<@NonNull String, @NonNull Object>>> predicates = generateRegexPredicate(); Predicate<ISegment> predicate = (segment) -> { Multimap<@NonNull String, @NonNull Object> input = ISegmentStoreProvider.getFilterInput(provider, segment); boolean activateProperty = false; for (Map.Entry<Integer, Predicate<Multimap<String, Object>>> mapEntry : predicates.entrySet()) { Integer property = Objects.requireNonNull(mapEntry.getKey()); Predicate<Multimap<String, Object>> value = Objects.requireNonNull(mapEntry.getValue()); if (property == IFilterProperty.DIMMED || property == IFilterProperty.EXCLUDE) { boolean status = value.test(input); activateProperty |= status; } } return activateProperty; }; if (segStore != null) { Job job = fFilteringJob; if (job != null) { job.cancel(); } if (predicates.isEmpty()) { updateModel(segStore); return; } job = new Job(Messages.SegmentStoreTableViewer_FilteringData) { @Override protected IStatus run(@Nullable IProgressMonitor monitor) { try (ScopeLog log = new ScopeLog(LOGGER, Level.FINE, "SegmentStoreTable:Filtering")) { SubMonitor subMonitor = SubMonitor.convert(monitor); ISegmentStore<ISegment> filteredStore = new ArrayListStore<>(); for (ISegment segment : segStore) { if (subMonitor.isCanceled()) { return Status.CANCEL_STATUS; } if (predicate.test(segment)) { filteredStore.add(segment); } } if (subMonitor.isCanceled()) { return Status.CANCEL_STATUS; } updateModel(filteredStore); return Status.OK_STATUS; } } }; fFilteringJob = job; job.schedule(); return; } updateModel(null); SegmentStoreProviderProgressListener listener = fListener; if (listener != null) { provider.addListener(listener); } if (provider instanceof IAnalysisModule) { ((IAnalysisModule) provider).schedule(); } }