This commit is contained in:
SuspiciousActivity committed 2021-03-28 22:55:09 +02:00
1 parent ed9b6a177b
commit 1c6a72d951
2 files changed
+10 -10

No files matched your search

+9 -9
View File
@@ -43,8 +43,8 @@ public class TypeOpenBox extends JFrame {
@Override
public void valueChanged(ListSelectionEvent e) {
String val = list.getSelectedValue();
if (val != null && !val.equals(Main.currentNodeName)) {
SingleThreadedExecutor.submit(() -> Main.selectFile(val));
if (!e.getValueIsAdjusting() && val != null && !val.equals(Main.currentNodeName)) {
SingleThreadedExecutor.submit(() -> Main.selectFile(val + ".class"));
}
}
});
@@ -79,17 +79,17 @@ public class TypeOpenBox extends JFrame {
}
String search = UnicodeUtils.unescape(null, txtSearch.getText(), true).toLowerCase();
if (search.contains("/")) {
for (String className : Main.classNodes.keySet()) {
if (!className.contains("$") && className.toLowerCase().startsWith(search)) {
model.addElement(className);
for (String fullName : Main.classNodes.keySet()) {
if (!fullName.contains("$") && fullName.toLowerCase().startsWith(search)) {
model.addElement(fullName);
}
}
} else {
for (String className : Main.classNodes.keySet()) {
String[] split = className.split("/");
className = split[split.length - 1];
for (String fullName : Main.classNodes.keySet()) {
String[] split = fullName.split("/");
String className = split[split.length - 1];
if (!className.contains("$") && className.toLowerCase().startsWith(search)) {
model.addElement(className);
model.addElement(fullName);
}
}
}
+1 -1
View File
@@ -40,7 +40,7 @@ public class ArchiveTreeModel extends DefaultTreeModel {
super(new ByteEditTreeNode(jar.getName().split(File.separator.equals("\\") ? "\\\\"
: File.separator)[jar.getName().split(File.separator.equals("\\") ? "\\\\" : File.separator).length
- 1]));
this.newCreated = true;
this.newCreated = false;
this.jar = jar;
this.classNodes = classNodes;
this.otherFiles = otherFiles;