Skip to content

Commit

Permalink
fixed registerInspection() in 2024.1.1 (issue #179)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkandalov committed May 2, 2024
1 parent 56fe4b2 commit 933d861
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ ext.kotlinVersion = "1.8.10"
ext.groovyVersion = "3.0.19"

intellij {
// Available IDE versions: https://www.jetbrains.com/intellij-repository/releases and https://www.jetbrains.com/intellij-repository/snapshots
// For available IDE versions see "com.jetbrains.intellij.idea" in
// https://www.jetbrains.com/intellij-repository/releases and https://www.jetbrains.com/intellij-repository/snapshots
version = System.getenv().getOrDefault("IJ_VERSION",
// "221.5080.210" // Compatibility with IJ 2022.1 (Groovy 3, Kotlin 1.6, changes in PluginClassLoader https://github.com/dkandalov/live-plugin/issues/123)
// "231.9161.38" // Compatibility with IJ 2023.1 (Kotlin 1.8, changes in PluginClassLoader https://github.com/dkandalov/live-plugin/issues/155)
"241.13688.18-EAP-SNAPSHOT" // Compatibility with IJ 2024.1 (Groovy 3.0.19, changes in PluginClassLoader)
// "241.13688.18-EAP-SNAPSHOT", // Compatibility with IJ 2024.1 (Groovy 3.0.19, changes in PluginClassLoader)
"2024.1.1" // Compatibility with IJ 2024.1.1
)
pluginName = "LivePlugin"
downloadSources = true
Expand Down
4 changes: 2 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<idea-plugin>
<id>LivePlugin</id>
<name>LivePlugin</name>
<version>0.8.7 beta</version>
<version>0.8.8 beta</version>
<vendor url="https://github.com/dkandalov/live-plugin"
email="dmitry.kandalov [at] gmail.com">Dmitry Kandalov</vendor>
<!-- https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -->
<!-- https://www.jetbrains.com/intellij-repository/releases -->
<idea-version since-build="231.7515.13"/>
<idea-version since-build="241.15989"/>
<category>Plugin Development</category>
<description>
<![CDATA[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package liveplugin.implementation

import com.intellij.codeInspection.InspectionProfile
import com.intellij.codeInspection.InspectionProfileEntry
import com.intellij.codeInspection.InspectionWrapperUtil
import com.intellij.codeInspection.ex.InspectionProfileImpl
import com.intellij.codeInspection.ex.InspectionToolRegistrar
import com.intellij.openapi.Disposable
Expand Down Expand Up @@ -34,8 +35,8 @@ class Inspections {
def projectProfile = inspectionsProfileOf(project)
inspections.each {
// remove using different instance of inspection should work because inspection is looked up by shortName
projectProfile.removeTool(InspectionToolRegistrar.wrapTool(it))
projectProfile.addTool(project, InspectionToolRegistrar.wrapTool(it), [:])
projectProfile.removeTool(InspectionWrapperUtil.wrapTool(it))
projectProfile.addTool(project, InspectionWrapperUtil.wrapTool(it), [:])
}
inspections.each { projectProfile.enableTool(it.shortName, project) }

Expand Down

0 comments on commit 933d861

Please sign in to comment.