private static boolean runOrInvokeAndWait(@NotNull final Computable<Boolean> f) {
    final boolean[] answer = new boolean[1];
    try {
      ApplicationManager.getApplication().invokeAndWait(() -> answer[0] = f.compute());
    }
    catch (Exception e) {
      answer[0] = true;
    }

    return answer[0];
  }
private static boolean runOrInvokeAndWait(@NotNull final Computable<Boolean> f)