Merge pull request #79 from maaatts/master

Made searching case sensitive
This commit is contained in:
Kalen (Konloch) Kinloch 2015-08-10 11:45:23 -06:00
commit 87876aa09c

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);