boolean () { IdeFocusManager fm = IdeFocusManager.getInstance(myProject); Component component = fm.getFocusedDescendantFor(this); if (component != null) { return true; } Component owner = fm.getLastFocusedFor(WindowManager.getInstance().getFrame(myProject)); return owner != null && SwingUtilities.isDescendingFrom(owner, this); }