public void collectProblems(@Nullable File file,
                              @NotNull Collection<? extends Exception> exceptions,
                              @NotNull List<? extends ModelProblem> modelProblems,
                              @NotNull Collection<? super MavenProjectProblem> collector) {
    for (Throwable each : exceptions) {
      collector.addAll(collectExceptionProblems(file, each));
    }
    for (ModelProblem problem : modelProblems) {
      String source;
      if (!StringUtilRt.isEmptyOrSpaces(problem.getSource())) {
        source = problem.getSource() +
                 ":" +
                 problem.getLineNumber() +
                 ":" +
                 problem.getColumnNumber();
      }
      else {
        source = file == null ? "" : file.getPath();
      }
      myConsoleWrapper.error("Maven model problem: " +
                             problem.getMessage() +
                             " at " +
                             problem.getSource() +
                             ":" +
                             problem.getLineNumber() +
                             ":" +
                             problem.getColumnNumber());
      Exception problemException = problem.getException();
      if (problemException != null) {
        myConsoleWrapper.error("Maven model problem", problemException);
        collector.add(MavenProjectProblem.createStructureProblem(source, problem.getMessage()));
      }
      else {
        collector.add(MavenProjectProblem.createStructureProblem(source, problem.getMessage(), true));
      }
    }
  }
public void collectProblems(@Nullable File file,
                              @NotNull Collection<? extends Exception> exceptions,
                              @NotNull List<? extends ModelProblem> modelProblems,
                              @NotNull Collection<? super MavenProjectProblem> collector)