private static JFrame getFrame() {
    final Frame[] all = Frame.getFrames();
    for (Frame each : all) {
      if (each instanceof IdeFrameImpl) {
        return (JFrame)each;
      }
    }

    throw new IllegalStateException("Cannot find IdeFrame to run on");
  }
private static JFrame getFrame()