List<Problem> (@NotNull Collection<? extends HighlightInfo> infos, @NotNull VirtualFile file, boolean hasErrorElement) { List<Problem> problems = new SmartList<>(); for (HighlightInfo info : infos) { if (info.getSeverity() == HighlightSeverity.ERROR) { Problem problem = new ProblemImpl(file, info, hasErrorElement); problems.add(problem); } } return problems; }