From 7740ae1e5e4459010bb5828cb4c44bfc1c68f8ea Mon Sep 17 00:00:00 2001 From: afffsdd Date: Thu, 30 Jul 2015 13:07:03 -0400 Subject: [PATCH 1/2] Ignore IntelliJ IDEA files --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4e801a74..b64d1edc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /bin/ .classpath -.project \ No newline at end of file +.project +*.iml +.idea/ \ No newline at end of file From 012c9e38d3a857aabd6fdaa22a56aa07593e1097 Mon Sep 17 00:00:00 2001 From: afffsdd Date: Thu, 30 Jul 2015 13:23:45 -0400 Subject: [PATCH 2/2] Fix file navigation typing issues When you type in the navigation pane it just selects the quick search bar. (party) --- .../gui/FileNavigationPane.java | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java b/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java index a2f85e5b..f63e0e59 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java @@ -48,6 +48,7 @@ import the.bytecode.club.bytecodeviewer.*; * * @author Konloch * @author WaterWolf + * @author afffsdd * */ @@ -64,6 +65,7 @@ public class FileNavigationPane extends VisibleComponent implements MyTree tree = new MyTree(treeRoot); final String quickSearchText = "Quick file search (no file extension)"; final JTextField quickSearch = new JTextField(quickSearchText); + boolean cancel = false; public KeyAdapter search = new KeyAdapter() { @Override @@ -191,6 +193,10 @@ public class FileNavigationPane extends VisibleComponent implements this.tree.addTreeSelectionListener(new TreeSelectionListener() { @Override public void valueChanged(final TreeSelectionEvent arg0) { + if (cancel) { + cancel = false; + return; + } openPath(arg0.getPath()); } }); @@ -203,11 +209,24 @@ public class FileNavigationPane extends VisibleComponent implements MyTree tree = (MyTree) arg0.getSource(); openPath(tree.getSelectionPath()); } + } else { + cancel = true; } } - @Override public void keyPressed(KeyEvent arg0) { } - @Override public void keyTyped(KeyEvent arg0) { } + @Override + public void keyTyped(KeyEvent e) { + quickSearch.grabFocus(); + quickSearch.setText("" + e.getKeyChar()); // fuck + cancel = true; + } + + @Override + public void keyPressed(KeyEvent e) { + quickSearch.grabFocus(); + quickSearch.setText("" + e.getKeyChar()); // fuck + cancel = true; + } }); quickSearch.addKeyListener(search);