Element (final VirtualFile file, final Collection<MavenProjectProblem> problems, final MavenProjectProblem.ProblemType type) { ReadStatisticsCollector.getInstance().fileRead(file); return MavenJDOMUtil.read(file, new MavenJDOMUtil.ErrorHandler() { @Override public void onReadError(IOException e) { MavenLog.LOG.warn("Cannot read the pom file: " + e); problems.add(MavenProjectProblem.createProblem(file.getPath(), e.getMessage(), type, false)); } @Override public void onSyntaxError() { problems.add(MavenProjectProblem.createSyntaxProblem(file.getPath(), type)); } }); }