Made searching case sensitive

Why was searching case insensitive to begin with?
This commit is contained in:
maaatts 2015-08-10 14:07:53 +01:00
parent d348091113
commit 69335f5aaf
1 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ public class FileNavigationPane extends VisibleComponent implements
MyTreeNode node = enums.nextElement(); MyTreeNode node = enums.nextElement();
if (node.isLeaf()) { if (node.isLeaf()) {
if (((String) (node.getUserObject())).toLowerCase().contains(path[path.length - 1].toLowerCase())) { if (((String) (node.getUserObject())).contains(path[path.length - 1])) {
TreeNode pathArray[] = node.getPath(); TreeNode pathArray[] = node.getPath();
int k = 0; int k = 0;
StringBuffer fullPath = new StringBuffer(); StringBuffer fullPath = new StringBuffer();
@ -159,7 +159,7 @@ public class FileNavigationPane extends VisibleComponent implements
} }
} }
String fullPathString = fullPath.toString(); String fullPathString = fullPath.toString();
if (fullPathString != null && fullPathString.toLowerCase().contains(qt.toLowerCase())) { if (fullPathString != null && fullPathString.contains(qt)) {
System.out.println("Found! " + node); System.out.println("Found! " + node);
final TreePath pathn = new TreePath(node.getPath()); final TreePath pathn = new TreePath(node.getPath());
tree.setSelectionPath(pathn.getParentPath()); tree.setSelectionPath(pathn.getParentPath());
@ -573,7 +573,7 @@ public class FileNavigationPane extends VisibleComponent implements
if(value != null && value instanceof the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode) { if(value != null && value instanceof the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode) {
the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode node = (the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode) value; the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode node = (the.bytecode.club.bytecodeviewer.gui.FileNavigationPane.MyTreeNode) value;
String name = node.toString().toLowerCase(); String name = node.toString();
if(name.endsWith(".jar")) { if(name.endsWith(".jar")) {
setIcon(Resources.jarIcon); setIcon(Resources.jarIcon);
@ -650,4 +650,4 @@ public class FileNavigationPane extends VisibleComponent implements
} }
} }
} }