mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
speed search: allow to select items with shift modifiers
This commit is contained in:
@@ -298,6 +298,7 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
|
||||
|
||||
protected void processKeyEvent(KeyEvent e) {
|
||||
if (e.isAltDown()) return;
|
||||
if (e.isShiftDown() && isNavigationKey(e.getKeyCode())) return;
|
||||
if (mySearchPopup != null) {
|
||||
mySearchPopup.processKeyEvent(e);
|
||||
return;
|
||||
@@ -499,6 +500,15 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
|
||||
return keyCode == KeyEvent.VK_HOME || keyCode == KeyEvent.VK_END || keyCode == KeyEvent.VK_UP || keyCode == KeyEvent.VK_DOWN;
|
||||
}
|
||||
|
||||
private static boolean isPgUpPgDown(int keyCode) {
|
||||
return keyCode == KeyEvent.VK_PAGE_UP || keyCode == KeyEvent.VK_PAGE_DOWN;
|
||||
}
|
||||
|
||||
private static boolean isNavigationKey(int keyCode) {
|
||||
return isPgUpPgDown(keyCode) || isUpDownHomeEnd(keyCode);
|
||||
}
|
||||
|
||||
|
||||
private void manageSearchPopup(@Nullable SearchPopup searchPopup) {
|
||||
Project project = null;
|
||||
if (ApplicationManager.getApplication() != null && !ApplicationManager.getApplication().isDisposed()) {
|
||||
|
||||
Reference in New Issue
Block a user