Collection<HighlightInfo> (final boolean checkWarnings, final boolean checkInfos, final boolean checkWeakWarnings) { return ContainerUtil.filter( checkHighlighting(new ExpectedHighlightingData(myEditor.getDocument(), checkWarnings, checkWeakWarnings, checkInfos)), info -> info.getSeverity() == HighlightSeverity.INFORMATION && checkInfos || info.getSeverity() == HighlightSeverity.WARNING && checkWarnings || info.getSeverity() == HighlightSeverity.WEAK_WARNING && checkWeakWarnings || info.getSeverity().compareTo(HighlightSeverity.WARNING) > 0); }