Commit 4f65ffd 1 parent d96aa2b commit 4f65ffd Copy full SHA for 4f65ffd
File tree 3 files changed +11
-2
lines changed
src/main/java/the/bytecode/club/bytecodeviewer
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 73
73
public class ResourceListPane extends TranslatedVisibleComponent implements FileDrop .Listener
74
74
{
75
75
public final JPopupMenu rightClickMenu = new JPopupMenu ();
76
+ public final JCheckBox autoOpen = new TranslatedJCheckBox ("Auto open" , TranslatedComponents .EXACT_PATH );
76
77
public final JCheckBox exact = new TranslatedJCheckBox ("Exact path" , TranslatedComponents .EXACT_PATH );
77
78
public final JCheckBox caseSensitive = new TranslatedJCheckBox ("Match case" , TranslatedComponents .MATCH_CASE );
78
79
public final JButton open = new JButton (IconResources .add );
@@ -125,6 +126,7 @@ public ResourceListPane()
125
126
JPanel btns = new JPanel (new FlowLayout ());
126
127
btns .add (exact );
127
128
btns .add (caseSensitive );
129
+ btns .add (autoOpen );
128
130
exactPanel .add (btns , BorderLayout .WEST );
129
131
130
132
buttonPanel .add (open , BorderLayout .EAST );
@@ -533,5 +535,4 @@ public void focusLost(final FocusEvent arg0)
533
535
}
534
536
});
535
537
}
536
-
537
- }
538
+ }
Original file line number Diff line number Diff line change @@ -157,6 +157,13 @@ public void keyPressed(final KeyEvent ke)
157
157
resourceListPane .tree .setSelectionPath (pathOpen );
158
158
resourceListPane .tree .makeVisible (pathOpen );
159
159
resourceListPane .tree .scrollPathToVisible (pathOpen );
160
+
161
+ if (resourceListPane .autoOpen .isSelected ())
162
+ {
163
+ resourceListPane .openPath (pathOpen );
164
+ resourceListPane .quickSearch .requestFocusInWindow ();
165
+ }
166
+
160
167
iteratePast ++;
161
168
success = true ;
162
169
}
Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ public enum TranslatedComponents
256
256
MATCH_CASE ,
257
257
EXACT_PATH ,
258
258
PRINT_LINE_NUMBERS ,
259
+ AUTO_OPEN ,
259
260
;
260
261
261
262
private final TranslatedComponentReference componentReference ;
You can’t perform that action at this time.
0 commit comments