HighlightDisplayLevel (final Project project, @NotNull final RadComponent component) { HighlightDisplayLevel displayLevel = null; for(ErrorInfo errInfo: getAllErrorsForComponent(component)) { if (displayLevel == null || SeverityRegistrar.getSeverityRegistrar(project).compare(errInfo.getHighlightDisplayLevel().getSeverity(), displayLevel.getSeverity()) > 0) { displayLevel = errInfo.getHighlightDisplayLevel(); } } return displayLevel; }