@Override protected synchronized void setup() { this.order = patchmanager.getSearchOptionsControl().getOrder(); this.queryString = patchmanager.getQueryString(); patchmanager.getPatchListCellRenderer().setHighlighter(new Highlighter(queryString)); patchmanager.getPatchListModel().setOrder(order); }
@Override protected void process() { String queryString; synchronized (this) { queryString = this.queryString; } Query query = new Query(null, queryString, 0); Query filteringQuery = new Query(null, queryString, 0.5f); patchmanager.getSearchOptionsControl().enableFiltersInQuery(filteringQuery); patchmanager.getPatchListModel().clear(); FilterUpdater filterUpdater = patchmanager.getSearchOptionsControl().createFilterUpdater(); Collector<IndexedPatch> collector = new MultiCollector<IndexedPatch>( new PatchQueryCollector(query, filterUpdater), new PatchQueryCollector(filteringQuery, patchmanager.getPatchListModel())); patchmanager.getIndex().collect(collector); patchmanager.getPatchListModel().update(); patchmanager .getPatchListView() .repaint(); // patchListModel bug => repaint should not be necessary synchronized (this) { this.filterUpdater = filterUpdater; } }