mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Find in Path Dialog: Preview tab does allow F4 to jump to source when focus in code preview pane (lower half) (IDEA-150915)
This commit is contained in:
@@ -644,6 +644,7 @@ public class FindDialog extends DialogWrapper {
|
||||
}
|
||||
};
|
||||
myUsagePreviewPanel.setBorder(IdeBorderFactory.createBorder());
|
||||
registerNavigateToSourceShortcutOnComponent(table, myUsagePreviewPanel);
|
||||
myResultsPreviewTable = table;
|
||||
new TableSpeedSearch(table, new Convertor<Object, String>() {
|
||||
@Override
|
||||
@@ -1753,13 +1754,6 @@ public class FindDialog extends DialogWrapper {
|
||||
super.installOn(c);
|
||||
|
||||
if (c instanceof JBTable) {
|
||||
AnAction anAction = new AnAction() {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
navigateToSelectedUsage((JBTable)c);
|
||||
}
|
||||
};
|
||||
|
||||
String key = "navigate.to.usage";
|
||||
JComponent component = (JComponent)c;
|
||||
component.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
|
||||
@@ -1771,9 +1765,19 @@ public class FindDialog extends DialogWrapper {
|
||||
}
|
||||
});
|
||||
//anAction.registerCustomShortcutSet(CommonShortcuts.ENTER, component);
|
||||
anAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), component, myDisposable);
|
||||
registerNavigateToSourceShortcutOnComponent((JBTable)c, component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void registerNavigateToSourceShortcutOnComponent(@NotNull final JBTable c, JComponent component) {
|
||||
AnAction anAction = new AnAction() {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
navigateToSelectedUsage(c);
|
||||
}
|
||||
};
|
||||
anAction.registerCustomShortcutSet(CommonShortcuts.getEditSource(), component, myDisposable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user