int (@NotNull HighlightInfo info, @NotNull SeverityRegistrar severityRegistrar) { int hardCodedLayer = InternalLayerSuppliers.getLayerFromSuppliers(info); if (hardCodedLayer > 0) { return hardCodedLayer; } HighlightSeverity severity = info.getSeverity(); int layer; if (severityRegistrar.compare(severity, HighlightSeverity.ERROR) >= 0) { layer = HighlighterLayer.ERROR; } else if (severityRegistrar.compare(severity, HighlightSeverity.WARNING) >= 0) { layer = HighlighterLayer.WARNING; } else if (severityRegistrar.compare(severity, HighlightSeverity.WEAK_WARNING) >= 0 || severity == HighlightSeverity.TEXT_ATTRIBUTES) { layer = HighlighterLayer.WEAK_WARNING; } else if (severity == HighlightInfoType.INJECTED_FRAGMENT_SEVERITY || severity == HighlightInfoType.HIGHLIGHTED_REFERENCE_SEVERITY) { layer = HighlighterLayer.CARET_ROW - 1; } else if (severity == HighlightInfoType.INJECTED_FRAGMENT_SYNTAX_SEVERITY) { layer = HighlighterLayer.CARET_ROW - 2; } else if (severity == HighlightInfoType.ELEMENT_UNDER_CARET_SEVERITY) { layer = HighlighterLayer.ELEMENT_UNDER_CARET; } else if (severityRegistrar.getAllSeverities().contains(severity) && !SeverityRegistrar.isDefaultSeverity(severity)) { layer = HighlighterLayer.WARNING; } else { layer = HighlighterLayer.ADDITIONAL_SYNTAX; } return layer; }