diff --git a/CHANGELOG.md b/CHANGELOG.md index 485afae..d4fa5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ## [Unreleased] +- Supports new versions of JetBrains IDEs. + ## [0.8.0] - 2026-07-27 - Supports new versions of JetBrains IDEs. diff --git a/gradle.properties b/gradle.properties index 43f2c07..b0b2d07 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,11 +4,11 @@ pluginGroup = com.github.leondevlifelog.gitea pluginName = Gitea pluginRepositoryUrl = https://github.com/LeonDevLifeLog/gitea-idea-plugin # SemVer format -> https://semver.org -pluginVersion=0.8.0 +pluginVersion=0.9.0 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=242 -pluginUntilBuild = 261.* +pluginUntilBuild = 262.* # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC diff --git a/src/main/kotlin/com/github/leondevlifelog/gitea/listeners/OpenProjectListener.kt b/src/main/kotlin/com/github/leondevlifelog/gitea/listeners/OpenProjectListener.kt index 2436b15..c4b1528 100644 --- a/src/main/kotlin/com/github/leondevlifelog/gitea/listeners/OpenProjectListener.kt +++ b/src/main/kotlin/com/github/leondevlifelog/gitea/listeners/OpenProjectListener.kt @@ -7,16 +7,16 @@ package com.github.leondevlifelog.gitea.listeners import com.github.leondevlifelog.gitea.GiteaConfig import com.github.leondevlifelog.gitea.util.GiteaNotifications -import com.intellij.ide.plugins.PluginManagerCore +import com.intellij.ide.plugins.cl.PluginAwareClassLoader import com.intellij.ide.util.RunOnceUtil -import com.intellij.openapi.extensions.PluginId import com.intellij.openapi.project.Project import com.intellij.openapi.startup.ProjectActivity class OpenProjectListener : ProjectActivity { override suspend fun execute(project: Project) { - val gitea = PluginManagerCore.getPlugin(PluginId.getId(GiteaConfig.GITEA_PLUGIN_ID)) - RunOnceUtil.runOnceForApp(GiteaConfig.GITEA_PLUGIN_ID + gitea?.version) { + val version = (OpenProjectListener::class.java.classLoader + as? PluginAwareClassLoader)?.pluginDescriptor?.version + RunOnceUtil.runOnceForApp(GiteaConfig.GITEA_PLUGIN_ID + version) { GiteaNotifications.showStarMe(project) } } diff --git a/src/main/kotlin/com/github/leondevlifelog/gitea/ui/clone/CloneDialogLoginPanel.kt b/src/main/kotlin/com/github/leondevlifelog/gitea/ui/clone/CloneDialogLoginPanel.kt index e6dc69a..0fb02ec 100644 --- a/src/main/kotlin/com/github/leondevlifelog/gitea/ui/clone/CloneDialogLoginPanel.kt +++ b/src/main/kotlin/com/github/leondevlifelog/gitea/ui/clone/CloneDialogLoginPanel.kt @@ -9,7 +9,6 @@ import com.github.leondevlifelog.gitea.GiteaBundle import com.github.leondevlifelog.gitea.authentication.accounts.GiteaAccount import com.github.leondevlifelog.gitea.authentication.accounts.GiteaAccountManager import com.github.leondevlifelog.gitea.ui.GiteaLoginPanel -import com.intellij.ide.IdeBundle import com.intellij.openapi.Disposable import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent @@ -58,7 +57,7 @@ internal class CloneDialogLoginPanel(private val account: GiteaAccount?) : } private val inlineCancelPanel = simplePanel() private val loginButton = JButton(GiteaBundle.message("clone.dialog.button.login.mnemonic")) - private val backLink = LinkLabel(IdeBundle.message("button.back"), null).apply { + private val backLink = LinkLabel(GiteaBundle.message("button.back"), null).apply { verticalAlignment = SwingConstants.CENTER } @@ -111,7 +110,7 @@ internal class CloneDialogLoginPanel(private val account: GiteaAccount?) : private fun setupNewUi(isOAuth: Boolean) { loginButton.isVisible = !isOAuth - backLink.text = if (isOAuth) IdeBundle.message("link.cancel") else IdeBundle.message("button.back") + backLink.text = if (isOAuth) GiteaBundle.message("link.cancel") else GiteaBundle.message("button.back") loginPanel.footer = { if (!isOAuth) buttonPanel() } // footer is used to put buttons in 2-nd column - align under text boxes diff --git a/src/main/resources/messages/GiteaBundle.properties b/src/main/resources/messages/GiteaBundle.properties index d6ea832..3c809ae 100644 --- a/src/main/resources/messages/GiteaBundle.properties +++ b/src/main/resources/messages/GiteaBundle.properties @@ -58,3 +58,5 @@ account.choose.not.selected=Not selected account github.star.me=Give Gitea Plugin a star on GitHub github.goto.star.it=Goto Star It github.made.with.love=Made with love!!! Your star helps me a lot!!! +button.back=Back +link.cancel=Cancel