mirror of
https://github.com/java-decompiler/jd-gui.git
synced 2024-11-23 04:29:51 +00:00
Fix #250 : "Search function not working correctly" since 1.6.0
This commit is contained in:
parent
64b17c6a18
commit
cf9262f3d6
@ -291,15 +291,17 @@ public class SearchInConstantPoolsController implements IndexesChangeListener {
|
||||
if (matchedEntries == null) {
|
||||
Map<String, Collection> index = indexes.getIndex(indexName);
|
||||
|
||||
if (patternLength == 1) {
|
||||
matchedEntries = matchWithCharFunction.apply(pattern.charAt(0), index);
|
||||
} else {
|
||||
String lastKey = key.substring(0, key.length() - 1);
|
||||
Map<String, Collection> lastMatchedTypes = cache.get(lastKey);
|
||||
if (lastMatchedTypes != null) {
|
||||
matchedEntries = matchWithStringFunction.apply(pattern, lastMatchedTypes);
|
||||
if (index != null) {
|
||||
if (patternLength == 1) {
|
||||
matchedEntries = matchWithCharFunction.apply(pattern.charAt(0), index);
|
||||
} else {
|
||||
matchedEntries = matchWithStringFunction.apply(pattern, index);
|
||||
String lastKey = key.substring(0, key.length() - 1);
|
||||
Map<String, Collection> lastMatchedTypes = cache.get(lastKey);
|
||||
if (lastMatchedTypes != null) {
|
||||
matchedEntries = matchWithStringFunction.apply(pattern, lastMatchedTypes);
|
||||
} else {
|
||||
matchedEntries = matchWithStringFunction.apply(pattern, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user