HighlightInfoHolder (@NotNull PsiFile file) { List<HighlightInfoFilter> filters = HighlightInfoFilter.EXTENSION_POINT_NAME.getExtensionList(); EditorColorsScheme actualScheme = getColorsScheme() == null ? EditorColorsManager.getInstance().getGlobalScheme() : getColorsScheme(); HighlightInfoHolder infoHolder = new HighlightInfoHolder(file, filters) { @Override public @NotNull TextAttributesScheme getColorsScheme() { return actualScheme; } @Override public boolean add(@Nullable HighlightInfo info) { boolean added = super.add(info); if (info != null && added) { queueInfoToUpdateIncrementally(info, info.getGroup() == 0 ? Pass.UPDATE_ALL : info.getGroup()); } return added; } }; AnnotationSessionImpl annotationSession = (AnnotationSessionImpl)infoHolder.getAnnotationSession(); HighlightSeverity minimumSeverity = ((HighlightingSessionImpl)HighlightingSessionImpl.getFromCurrentIndicator(file)).getMinimumSeverity(); annotationSession.setMinimumSeverity(minimumSeverity); return infoHolder; }