File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed
src/main/java/the/bytecode/club/bytecodeviewer Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 7373public class ResourceListPane extends TranslatedVisibleComponent implements FileDrop .Listener
7474{
7575 public final JPopupMenu rightClickMenu = new JPopupMenu ();
76+ public final JCheckBox autoOpen = new TranslatedJCheckBox ("Auto open" , TranslatedComponents .EXACT_PATH );
7677 public final JCheckBox exact = new TranslatedJCheckBox ("Exact path" , TranslatedComponents .EXACT_PATH );
7778 public final JCheckBox caseSensitive = new TranslatedJCheckBox ("Match case" , TranslatedComponents .MATCH_CASE );
7879 public final JButton open = new JButton (IconResources .add );
@@ -125,6 +126,7 @@ public ResourceListPane()
125126 JPanel btns = new JPanel (new FlowLayout ());
126127 btns .add (exact );
127128 btns .add (caseSensitive );
129+ btns .add (autoOpen );
128130 exactPanel .add (btns , BorderLayout .WEST );
129131
130132 buttonPanel .add (open , BorderLayout .EAST );
@@ -533,5 +535,4 @@ public void focusLost(final FocusEvent arg0)
533535 }
534536 });
535537 }
536-
537- }
538+ }
Original file line number Diff line number Diff line change @@ -157,6 +157,13 @@ public void keyPressed(final KeyEvent ke)
157157 resourceListPane .tree .setSelectionPath (pathOpen );
158158 resourceListPane .tree .makeVisible (pathOpen );
159159 resourceListPane .tree .scrollPathToVisible (pathOpen );
160+
161+ if (resourceListPane .autoOpen .isSelected ())
162+ {
163+ resourceListPane .openPath (pathOpen );
164+ resourceListPane .quickSearch .requestFocusInWindow ();
165+ }
166+
160167 iteratePast ++;
161168 success = true ;
162169 }
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ public enum TranslatedComponents
256256 MATCH_CASE ,
257257 EXACT_PATH ,
258258 PRINT_LINE_NUMBERS ,
259+ AUTO_OPEN ,
259260 ;
260261
261262 private final TranslatedComponentReference componentReference ;
You can’t perform that action at this time.
0 commit comments