@Nullable
  private static Project detectCurrentProject() {
    IdeFrame frame = IdeFocusManager.getGlobalInstance().getLastFocusedFrame();
    return frame != null ? frame.getProject() : null;
  }
@Nullable
  private static Project detectCurrentProject()