TextAttributesKey () { if (myEnforcedAttributesKey != null) return myEnforcedAttributesKey; return switch (myHighlightType) { case GENERIC_ERROR_OR_WARNING -> { if (mySeverity == HighlightSeverity.ERROR) yield CodeInsightColors.ERRORS_ATTRIBUTES; if (mySeverity == HighlightSeverity.WARNING) yield CodeInsightColors.WARNINGS_ATTRIBUTES; if (mySeverity == HighlightSeverity.WEAK_WARNING) yield CodeInsightColors.WEAK_WARNING_ATTRIBUTES; yield HighlighterColors.NO_HIGHLIGHTING; } case GENERIC_ERROR -> CodeInsightColors.ERRORS_ATTRIBUTES; case LIKE_DEPRECATED -> CodeInsightColors.DEPRECATED_ATTRIBUTES; case LIKE_UNUSED_SYMBOL -> CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES; case LIKE_UNKNOWN_SYMBOL, ERROR -> CodeInsightColors.WRONG_REFERENCES_ATTRIBUTES; default -> HighlighterColors.NO_HIGHLIGHTING; }; }