IDEA-64850 Go to Declaration, when Quick search is open, takes you to quick search field

This commit is contained in:
Kirill Kalishev
2011-02-07 20:30:50 +03:00
parent 356a405618
commit b7e6458478
3 changed files with 9 additions and 13 deletions
@@ -719,6 +719,13 @@ public class JBTabsImpl extends JComponent
return new ActionCallback.Done();
}
else {
Component owner = myFocusManager.getFocusOwner();
JComponent c = info.getComponent();
if (c != null && owner != null) {
if (c == owner || SwingUtilities.isDescendingFrom(owner, c)) {
return new ActionCallback.Done();
}
}
return requestFocus(getToFocus());
}
}
@@ -120,7 +120,7 @@ final class EditorTabbedContainer implements Disposable, CloseAction.CloseTarget
}, "EditorChange", null);
return result;
}
});
}).getPresentation().setRequestFocusOnLastFocusedComponent(true);
setTabPlacement(UISettings.getInstance().EDITOR_TAB_PLACEMENT);
@@ -581,18 +581,7 @@ public class EditorsSplitters extends JPanel {
if (window != null) {
final EditorWithProviderComposite selectedEditor = myCurrentWindow.getSelectedEditor();
if (selectedEditor != null) {
boolean alreadyFocused = false;
final JComponent comp = selectedEditor.getComponent();
final Component owner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
if (owner != null && comp != null) {
alreadyFocused = owner == comp || SwingUtilities.isDescendingFrom(owner, comp);
}
if (requestFocus && !alreadyFocused) {
IdeFocusManager.getInstance(myManager.getProject()).requestFocus(comp, requestFocus).doWhenDone(fireRunnable);
} else {
fireRunnable.run();
}
fireRunnable.run();
}
} else {
fireRunnable.run();