@Override
  public void check(ProjectStructureProblemsHolder problemsHolder) {
    checkModulesNames(problemsHolder);

    final ModuleRootModel rootModel = getRootModel();
    if (rootModel == null) return; //already disposed
    final OrderEntry[] entries = rootModel.getOrderEntries();
    for (OrderEntry entry : entries) {
      if (!entry.isValid()){
        if (entry instanceof JdkOrderEntry && ((JdkOrderEntry)entry).getJdkName() == null) {
          if (!(entry instanceof InheritedJdkOrderEntry)) {
            problemsHolder.registerProblem(JavaUiBundle.message("project.roots.module.jdk.problem.message"), null, ProjectStructureProblemType.error("module-sdk-not-defined"), createPlace(entry),
                                           null);
          }
        }
        else {
          problemsHolder.registerProblem(JavaUiBundle.message("project.roots.library.problem.message", entry.getPresentableName()), null,
                                         ProjectStructureProblemType.error("invalid-module-dependency"), createPlace(entry),
                                         null);
        }
      }
    }
  }
@Override
  public void check(ProjectStructureProblemsHolder problemsHolder)