private static void initToolWindowIfNeeded(@NotNull FacetDependentToolWindow extension, @NotNull Project project) {
    ProjectFacetManager projectFacetManager = ProjectFacetManager.getInstance(project);
    for (FacetType<?, ?> type : extension.getFacetTypes()) {
      if (projectFacetManager.hasFacets(type.getId())) {
        ensureToolWindowExists(extension, project);
        return;
      }
    }
  }
private static void initToolWindowIfNeeded(@NotNull FacetDependentToolWindow extension, @NotNull Project project)