mirror of
https://github.com/chylex/IntelliJ-Inspection-Lens.git
synced 2024-11-25 16:42:54 +01:00
Compare commits
No commits in common. "ce85aa130d2ba0b632dd4c34c0188e45b7c6f44e" and "e6be154f88c78d2d6aa878ed96774f02c507a6dc" have entirely different histories.
ce85aa130d
...
e6be154f88
@ -4,11 +4,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.6.21"
|
||||
id("org.jetbrains.intellij") version "1.9.0"
|
||||
id("org.jetbrains.intellij") version "1.7.0"
|
||||
}
|
||||
|
||||
group = "com.chylex.intellij.inspectionlens"
|
||||
version = "1.1.0"
|
||||
version = "1.0.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@ -63,18 +63,17 @@ class LensMarkupModelListener private constructor(editor: Editor) : MarkupModelL
|
||||
companion object {
|
||||
private val MINIMUM_SEVERITY = HighlightSeverity.TEXT_ATTRIBUTES.myVal + 1
|
||||
|
||||
private fun getHighlightInfoIfValid(highlighter: RangeHighlighter): HighlightInfo? {
|
||||
return if (highlighter.isValid)
|
||||
HighlightInfo.fromRangeHighlighter(highlighter)?.takeIf { it.severity.myVal >= MINIMUM_SEVERITY }
|
||||
else
|
||||
null
|
||||
}
|
||||
|
||||
private inline fun runWithHighlighterIfValid(highlighter: RangeHighlighter, actionForImmediate: (HighlighterWithInfo) -> Unit, actionForAsync: (HighlighterWithInfo.Async) -> Unit) {
|
||||
val info = getHighlightInfoIfValid(highlighter)
|
||||
if (info != null) {
|
||||
processHighlighterWithInfo(HighlighterWithInfo.from(highlighter, info), actionForImmediate, actionForAsync)
|
||||
if (!highlighter.isValid) {
|
||||
return
|
||||
}
|
||||
|
||||
val info = HighlightInfo.fromRangeHighlighter(highlighter)
|
||||
if (info == null || info.severity.myVal < MINIMUM_SEVERITY) {
|
||||
return
|
||||
}
|
||||
|
||||
processHighlighterWithInfo(HighlighterWithInfo.from(highlighter, info), actionForImmediate, actionForAsync)
|
||||
}
|
||||
|
||||
private inline fun processHighlighterWithInfo(highlighterWithInfo: HighlighterWithInfo, actionForImmediate: (HighlighterWithInfo) -> Unit, actionForAsync: (HighlighterWithInfo.Async) -> Unit) {
|
||||
|
@ -17,11 +17,6 @@
|
||||
]]></description>
|
||||
|
||||
<change-notes><![CDATA[
|
||||
<b>Version 1.1.0</b>
|
||||
<ul>
|
||||
<li>Fixed showing inspections that include HTML in their description. (<a href="https://github.com/chylex/IntelliJ-Inspection-Lens/pull/3">PR #3</a> by <a href="https://github.com/KostkaBrukowa">KostkaBrukowa</a>)</li>
|
||||
<li>Fixed exception when asynchronous inspections run on a non-EDT thread.
|
||||
</ul>
|
||||
<b>Version 1.0.0</b>
|
||||
<ul>
|
||||
<li>Initial version with support for IntelliJ 2022.2 and newer.</li>
|
||||
|
Loading…
Reference in New Issue
Block a user