1
0
mirror of https://github.com/chylex/IntelliJ-Inspection-Lens.git synced 2025-05-10 08:34:05 +02:00

Hide inspections used only for custom text attributes introduced in 2022.2

This commit is contained in:
chylex 2022-07-29 12:43:33 +02:00
parent 20967f53d5
commit 85d85a3911
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548

View File

@ -37,7 +37,7 @@ class LensMarkupModelListener private constructor(editor: Editor) : MarkupModelL
}
val info = HighlightInfo.fromRangeHighlighter(highlighter)
if (info == null || info.severity.myVal <= HighlightSeverity.INFORMATION.myVal) {
if (info == null || info.severity.myVal < MINIMUM_SEVERITY) {
return
}
@ -60,6 +60,8 @@ class LensMarkupModelListener private constructor(editor: Editor) : MarkupModelL
}
companion object {
private val MINIMUM_SEVERITY = HighlightSeverity.DEFAULT_SEVERITIES.toList().minusElement(HighlightSeverity.INFORMATION).minOf(HighlightSeverity::myVal)
/**
* Attaches a new [LensMarkupModelListener] to the document model of the provided [TextEditor], and reports all existing inspection highlights to [EditorInlayLensManager].
*