Skip to content

Commit

Permalink
remove obsolete search worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Apr 20, 2019
1 parent 6342c8f commit 2bb96e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 86 deletions.
12 changes: 0 additions & 12 deletions src/main/java/org/jabref/gui/search/GlobalSearchBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ public class GlobalSearchBar extends HBox {
private final Button searchModeButton = new Button();
private final Label currentResults = new Label("");
private final SearchQueryHighlightObservable searchQueryHighlightObservable = new SearchQueryHighlightObservable();
private SearchWorker searchWorker;

private SearchDisplayMode searchDisplayMode;

public GlobalSearchBar(JabRefFrame frame) {
Expand Down Expand Up @@ -171,7 +169,6 @@ public void endSearch() {
clearSearch();
MainTable mainTable = frame.getCurrentBasePanel().getMainTable();
mainTable.requestFocus();
//SwingUtilities.invokeLater(() -> mainTable.ensureVisible(mainTable.getSelectedRow()));
}
}

Expand All @@ -198,11 +195,6 @@ public void performSearch() {
if (currentBasePanel == null) {
return;
}

if (searchWorker != null) {
searchWorker.cancel(true);
}

// An empty search field should cause the search to be cleared.
if (searchField.getText().isEmpty()) {
clearSearch();
Expand All @@ -216,10 +208,6 @@ public void performSearch() {
}

Globals.stateManager.setSearchQuery(searchQuery);

// TODO: Remove search worker as this is doing the work twice now
searchWorker = new SearchWorker(currentBasePanel, searchQuery, searchDisplayMode);
Globals.TASK_EXECUTOR.execute(searchWorker);
}

private void informUserAboutInvalidSearchQuery() {
Expand Down
74 changes: 0 additions & 74 deletions src/main/java/org/jabref/gui/search/SearchWorker.java

This file was deleted.

0 comments on commit 2bb96e2

Please sign in to comment.