From bef05bace5a048d526142b90bd9a0040182a2a3e Mon Sep 17 00:00:00 2001 From: BlueBoxWare Date: Fri, 28 Apr 2023 15:43:34 +0200 Subject: [PATCH] Version 1.24.5: Compatibility with IntelliJ 2023.1.1. --- CHANGES.md | 3 +++ gradle.properties | 9 ++++----- .../libgdxplugin/ui/ImagePreviewDocumentationTarget.kt | 2 +- src/main/resources/META-INF/plugin.xml | 2 +- .../libgdxplugin/TestTextTextureRegionPreview.kt | 7 ++++--- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e675554c..891b4b00 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +### 1.24.5 +# Compatibility with IntelliJ 2023.1.1. + ### 1.24.4 * Fix [#35](https://github.com/BlueBoxWare/LibGDXPlugin/issues/35): "No documentation found" on Ctrl+Q when plugin is enabled. diff --git a/gradle.properties b/gradle.properties index df544e2c..2372e7cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,16 +1,15 @@ pluginGroup = com.gmail.blueboxware pluginName = LibGDX Plugin -pluginVersion = 1.24.4 +pluginVersion = 1.24.5 -pluginSinceBuild = 231.8109.175 +pluginSinceBuild = 231.8770.53 pluginUntilBuild = # See https://www.jetbrains.com/intellij-repository/snapshots/ for available build versions. -pluginVerifierIdeVersions = 231.8109.175 +pluginVerifierIdeVersions = 231.8770.53 platformType = IC -#platformVersion = 223.8214.52 -platformVersion = 231.8109.175 +platformVersion = 231.8770-EAP-CANDIDATE-SNAPSHOT platformDownloadSources = true platformPlugins = java, Kotlin, Groovy, properties diff --git a/src/main/kotlin/com/gmail/blueboxware/libgdxplugin/ui/ImagePreviewDocumentationTarget.kt b/src/main/kotlin/com/gmail/blueboxware/libgdxplugin/ui/ImagePreviewDocumentationTarget.kt index dcbd30c8..ffd061c6 100644 --- a/src/main/kotlin/com/gmail/blueboxware/libgdxplugin/ui/ImagePreviewDocumentationTarget.kt +++ b/src/main/kotlin/com/gmail/blueboxware/libgdxplugin/ui/ImagePreviewDocumentationTarget.kt @@ -28,13 +28,13 @@ import com.gmail.blueboxware.libgdxplugin.utils.PROPERTY_NAME_TINTED_DRAWABLE_NA import com.gmail.blueboxware.libgdxplugin.utils.TINTED_DRAWABLE_CLASS_NAME import com.gmail.blueboxware.libgdxplugin.utils.tint import com.intellij.model.Pointer -import com.intellij.navigation.TargetPresentation import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.util.SystemInfo import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.HtmlBuilder import com.intellij.openapi.util.text.HtmlChunk import com.intellij.platform.backend.documentation.DocumentationTarget +import com.intellij.platform.backend.presentation.TargetPresentation import com.intellij.psi.PsiElement import com.intellij.util.ui.ImageUtil import org.jetbrains.kotlin.psi.psiUtil.createSmartPointer diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 44c38872..424c4a7b 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -31,7 +31,7 @@ -
  • Fix #35: "No documentation found" on Ctrl+Q when plugin is enabled.
  • +
  • Compatibility with IntelliJ 2023.1.1.
  • ]]>
    diff --git a/src/test/kotlin/com/gmail/blueboxware/libgdxplugin/TestTextTextureRegionPreview.kt b/src/test/kotlin/com/gmail/blueboxware/libgdxplugin/TestTextTextureRegionPreview.kt index ca2e40b6..2428dea0 100644 --- a/src/test/kotlin/com/gmail/blueboxware/libgdxplugin/TestTextTextureRegionPreview.kt +++ b/src/test/kotlin/com/gmail/blueboxware/libgdxplugin/TestTextTextureRegionPreview.kt @@ -45,16 +45,17 @@ class TestTextTextureRegionPreview : LibGDXCodeInsightFixtureTestCase() { fun doTest(fileName: String, tinted: Boolean = true, width: Int = 50, height: Int = 50) { configureByFile(fileName) val element = file.findElementAt(myFixture.caretOffset) ?: throw AssertionError() - val preview: String = + + @Suppress("OverrideOnly") val preview: String = ImagePreviewPsiDocumentationTargetProvider().documentationTarget(element, element) ?.computeDocumentationHint() ?: throw AssertionError() + val imageFile = Regex("""src="([^"]+)"""").find(preview)?.groupValues?.get(1) ?: throw AssertionError() val image = ImageIO.read(URL(imageFile)) assertEquals(width, image.width) assertEquals(height, image.height) if (tinted) { - @Suppress("UseJBColor") - assertEquals(Color.YELLOW, Color(image.getRGB(1, 1))) + @Suppress("UseJBColor") assertEquals(Color.YELLOW, Color(image.getRGB(1, 1))) } }