Fix #250 : "Search function not working correctly" since 1.6.0

This commit is contained in:
emmanue1 2019-06-30 09:09:11 +02:00
parent 64b17c6a18
commit cf9262f3d6
2 changed files with 10 additions and 9 deletions

View File

@ -291,6 +291,7 @@ public class SearchInConstantPoolsController implements IndexesChangeListener {
if (matchedEntries == null) {
Map<String, Collection> index = indexes.getIndex(indexName);
if (index != null) {
if (patternLength == 1) {
matchedEntries = matchWithCharFunction.apply(pattern.charAt(0), index);
} else {
@ -302,6 +303,7 @@ public class SearchInConstantPoolsController implements IndexesChangeListener {
matchedEntries = matchWithStringFunction.apply(pattern, index);
}
}
}
// Cache matchingEntries
cache.put(key, matchedEntries);

View File

@ -250,7 +250,6 @@ public class SearchInConstantPoolsView<T extends DefaultMutableTreeNode & Contai
if (selectedTreeNode != null) {
selectedTypeCallback.accept(selectedTreeNode.getUri(), searchInConstantPoolsEnterTextField.getText(), getFlags());
}
searchInConstantPoolsDialog.setVisible(false);
}
};
searchInConstantPoolsOpenButton.addActionListener(searchInConstantPoolsOpenActionListener);