diff --git a/README.md b/README.md index 5d5b68d..291971a 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ A JetBrains IDE plugin that enhances development efficiency by enabling seamless ### Requirements - [Cursor](https://cursor.com) installed -- Compatible with all JetBrains IDEs (version 2022.3 and above) +- Compatible with all JetBrains IDEs (version 2021.2 and above) ## 🧑‍💻 Developer Guide diff --git a/README_zh.md b/README_zh.md index 210103f..3d3f4d9 100644 --- a/README_zh.md +++ b/README_zh.md @@ -74,7 +74,7 @@ ### 环境要求 - 已安装 [Cursor](https://cursor.com) -- 兼容所有 JetBrains IDE(2022.3 及以上版本) +- 兼容所有 JetBrains IDE(2021.2 及以上版本) ## 🧑‍💻 开发者指南 diff --git a/build.gradle.kts b/build.gradle.kts index 9edf245..49e5073 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ repositories { // Configure Gradle IntelliJ Plugin // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html intellij { - version.set("2022.3") + version.set("2021.2") type.set("IC") // Target IDE Platform pluginName.set("Switch2Cursor") updateSinceUntilBuild.set(true) @@ -27,15 +27,15 @@ intellij { tasks { // Set the JVM compatibility versions withType { - sourceCompatibility = "17" - targetCompatibility = "17" + sourceCompatibility = "11" + targetCompatibility = "11" } withType { - kotlinOptions.jvmTarget = "17" + kotlinOptions.jvmTarget = "11" } patchPluginXml { - sinceBuild.set("223") + sinceBuild.set("212") untilBuild.set("") } diff --git a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt index bae398d..e3ddfd6 100644 --- a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt +++ b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenFileInCursorAction.kt @@ -9,15 +9,10 @@ import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.editor.Editor import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile -import com.intellij.openapi.actionSystem.ActionUpdateThread class OpenFileInCursorAction : AnAction() { private val logger = Logger.getInstance(OpenFileInCursorAction::class.java) - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } - override fun actionPerformed(e: AnActionEvent) { val project: Project = e.project ?: return val virtualFile: VirtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE) ?: return diff --git a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenProjectInCursorAction.kt b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenProjectInCursorAction.kt index a386939..8311681 100644 --- a/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenProjectInCursorAction.kt +++ b/src/main/kotlin/com/github/qczone/switch2cursor/actions/OpenProjectInCursorAction.kt @@ -6,15 +6,10 @@ import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.diagnostic.Logger import com.intellij.openapi.project.Project -import com.intellij.openapi.actionSystem.ActionUpdateThread class OpenProjectInCursorAction : AnAction() { private val logger = Logger.getInstance(OpenProjectInCursorAction::class.java) - override fun getActionUpdateThread(): ActionUpdateThread { - return ActionUpdateThread.BGT - } - override fun actionPerformed(e: AnActionEvent) { val project: Project = e.project ?: return val projectPath = project.basePath ?: return