/** * Main method responsible for getting the filtered items and checking * for duplicates. It is based on the * {@link FilteredItemsSelectionDialog.ContentProvider#getFilteredItems(Object, IProgressMonitor)}. * * @param checkDuplicates * <code>true</code> if data concerning elements * duplication should be computed - it takes much more time * than standard filtering * * @param monitor * progress monitor */ public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) { reset = false; currentlyCompletingFilter = filter; // the work is divided into two actions of the same length int totalWork = checkDuplicates ? 200 : 100; SubMonitor subMonitor = SubMonitor.convert(monitor, WorkbenchMessages.FilteredItemsSelectionDialog_cacheRefreshJob, totalWork); // the TableViewer's root (the input) is treated as parent lastFilteredItems = Arrays.asList(getFilteredItems(list.getInput(), subMonitor.split(100))); if (reset || subMonitor.isCanceled()) { return; } if (checkDuplicates) { checkDuplicates(subMonitor.split(100)); } }