private static IdeFrame findFrame(JComponent owner) {
    final Window frame = SwingUtilities.getWindowAncestor(owner);
    if (frame instanceof IdeFrame) {
      return (IdeFrame)frame;
    }

    return null;
  }
private static IdeFrame findFrame(JComponent owner)