diff --git a/changelog.md b/changelog.md index ddd59b9..3102045 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ #### 2.0.1 - Based on detekt 1.23.1 +- Plugin intentions/quick fixes have now lower priority - [#487](https://github.com/detekt/detekt-intellij-plugin/issues/487) #### 2.0.0 diff --git a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/DetektAnnotator.kt b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/DetektAnnotator.kt index 1ad7bbe..0aeff54 100644 --- a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/DetektAnnotator.kt +++ b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/DetektAnnotator.kt @@ -9,7 +9,7 @@ import com.intellij.psi.PsiFile import io.gitlab.arturbosch.detekt.api.CorrectableCodeSmell import io.gitlab.arturbosch.detekt.api.Finding import io.gitlab.arturbosch.detekt.api.TextLocation -import io.gitlab.arturbosch.detekt.idea.action.AddToBaselineAction +import io.gitlab.arturbosch.detekt.idea.intention.AddToBaselineAction import io.gitlab.arturbosch.detekt.idea.config.DetektPluginSettings import io.gitlab.arturbosch.detekt.idea.intention.AutoCorrectIntention import io.gitlab.arturbosch.detekt.idea.util.isDetektEnabled diff --git a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/action/AddToBaselineAction.kt b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AddToBaselineAction.kt similarity index 93% rename from src/main/kotlin/io/gitlab/arturbosch/detekt/idea/action/AddToBaselineAction.kt rename to src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AddToBaselineAction.kt index 342b6e6..48ef099 100644 --- a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/action/AddToBaselineAction.kt +++ b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AddToBaselineAction.kt @@ -1,7 +1,8 @@ -package io.gitlab.arturbosch.detekt.idea.action +package io.gitlab.arturbosch.detekt.idea.intention import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.codeInsight.intention.LowPriorityAction import com.intellij.openapi.components.service import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project @@ -14,7 +15,7 @@ import io.gitlab.arturbosch.detekt.idea.config.DetektPluginSettings import io.gitlab.arturbosch.detekt.idea.util.absoluteBaselinePath import kotlin.io.path.exists -class AddToBaselineAction(private val finding: Finding) : IntentionAction { +class AddToBaselineAction(private val finding: Finding) : IntentionAction, LowPriorityAction { override fun startInWriteAction(): Boolean = true diff --git a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AutoCorrectIntention.kt b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AutoCorrectIntention.kt index cb3ec0c..1761d15 100644 --- a/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AutoCorrectIntention.kt +++ b/src/main/kotlin/io/gitlab/arturbosch/detekt/idea/intention/AutoCorrectIntention.kt @@ -1,13 +1,14 @@ package io.gitlab.arturbosch.detekt.idea.intention import com.intellij.codeInsight.intention.IntentionAction +import com.intellij.codeInsight.intention.LowPriorityAction import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.psi.PsiFile import io.gitlab.arturbosch.detekt.idea.DETEKT import io.gitlab.arturbosch.detekt.idea.action.AutoCorrectAction -class AutoCorrectIntention : IntentionAction { +class AutoCorrectIntention : IntentionAction, LowPriorityAction { override fun startInWriteAction(): Boolean = true diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 7023d9b..5443dea 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -77,6 +77,7 @@
  • 2.0.0