HighlightInfoHolder (@NotNull PsiFile injectedPsi, @NotNull DocumentWindow documentWindow, @NotNull InjectedLanguageManager injectedLanguageManager, @NotNull Consumer<? super HighlightInfo> outInfos) { List<HighlightInfoFilter> filters = HighlightInfoFilter.EXTENSION_POINT_NAME.getExtensionList(); EditorColorsScheme actualScheme = getColorsScheme() == null ? EditorColorsManager.getInstance().getGlobalScheme() : getColorsScheme(); return new HighlightInfoHolder(injectedPsi, filters) { @Override public @NotNull TextAttributesScheme getColorsScheme() { return actualScheme; } @Override public boolean add(@Nullable HighlightInfo info) { boolean added = super.add(info); if (info != null && added) { addPatchedInfos(info, injectedPsi, documentWindow, injectedLanguageManager, outInfos); } return added; } }; }