diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 767fe921..ef3613a0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,9 +1,10 @@ [versions] -intellij = "251.23774.318-EAP-SNAPSHOT" -intellijPreview = "251.23774.318-EAP-SNAPSHOT" +intellij = "252.23591.19-EAP-SNAPSHOT" +intellijPreview = "252.23591.19-EAP-SNAPSHOT" junit-platform = "1.13.2" junit5 = "5.13.2" junixsocket = "2.10.1" +kotlin = "2.2.0" lsp4j = "0.24.0" [libraries] @@ -26,4 +27,4 @@ changelog = "org.jetbrains.changelog:2.2.1" gradleJvmWrapper = "me.filippov.gradle.jvm.wrapper:0.14.0" grammarkit = "org.jetbrains.grammarkit:2022.3.2.2" intellijPlatform = "org.jetbrains.intellij.platform:2.6.0" -kotlin = { id = "org.jetbrains.kotlin.jvm", version = "2.0.0" } +kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } diff --git a/intellij-updater.json b/intellij-updater.json index 20e9f501..1a0f2ecd 100644 --- a/intellij-updater.json +++ b/intellij-updater.json @@ -3,14 +3,17 @@ "file": "gradle/libs.versions.toml", "field": "intellij", "kind": "intellij-idea-community", - "versionFlavor": "release", - "versionConstraint": "latestWave", - "order": "oldest" + "versionFlavor": "eap" }, { "file": "gradle/libs.versions.toml", "field": "intellijPreview", "kind": "intellij-idea-community", "versionFlavor": "eap" + }, { + "file": "gradle/libs.versions.toml", + "field": "kotlin", + "kind": "kotlin", + "versionFlavor": "eap" }], "prBodyPrefix": "## Maintainer Note\n> [!WARNING]\n> This PR will not trigger CI by default. Please **close it and reopen manually** to trigger the CI.\n>\n> Unfortunately, this is a consequence of the current GitHub Action security model (by default, PRs created automatically aren't allowed to trigger other automation)." } diff --git a/src/main/kotlin/com/intellij/plugin/powershell/ide/injection/PowerShellLanguageInjector.kt b/src/main/kotlin/com/intellij/plugin/powershell/ide/injection/PowerShellLanguageInjector.kt index 39cf8401..73877173 100644 --- a/src/main/kotlin/com/intellij/plugin/powershell/ide/injection/PowerShellLanguageInjector.kt +++ b/src/main/kotlin/com/intellij/plugin/powershell/ide/injection/PowerShellLanguageInjector.kt @@ -1,7 +1,6 @@ package com.intellij.plugin.powershell.ide.injection import com.intellij.lang.ASTNode -import com.intellij.lang.injection.InjectedLanguageManager import com.intellij.lang.injection.MultiHostInjector import com.intellij.lang.injection.MultiHostRegistrar import com.intellij.openapi.util.TextRange @@ -43,9 +42,8 @@ class PowerShellLanguageInjector : MultiHostInjector { val parts = splitLiteralToInjectionParts(baseInjection, context) val language = InjectorUtils.getLanguageByString(baseInjection.injectedLanguageId) ?: return InjectorUtils.registerInjection(language, file, parts.ranges, registrar) - InjectorUtils.registerSupport(support, false, context, language) - InjectorUtils.putInjectedFileUserData(context, language, InjectedLanguageManager.FRANKENSTEIN_INJECTION, - if (parts.isUnparsable) java.lang.Boolean.TRUE else null) + InjectorUtils.registerSupport(registrar, support, false) + registrar.frankensteinInjection(parts.isUnparsable) } else { InjectorUtils.registerInjectionSimple(context, baseInjection, support, registrar) } diff --git a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt index 26f21d8c..b578086d 100644 --- a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt +++ b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/EditorServicesLanguageHostStarter.kt @@ -324,7 +324,7 @@ open class EditorServicesLanguageHostStarter(protected val myProject: Project) : val handler = object : OSProcessHandler(process, commandLine) { override fun readerOptions() = BaseOutputReader.Options.forMostlySilentProcess() } - handler.addProcessListener(object : ProcessAdapter() { + handler.addProcessListener(object : ProcessListener { private var isFirstLineProcessed = false private val decoder = AnsiEscapeDecoder() override fun onTextAvailable(event: ProcessEvent, outputType: Key<*>) { diff --git a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/terminal/PowerShellConsoleTerminalRunner.kt b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/terminal/PowerShellConsoleTerminalRunner.kt index 737d1dbe..d1ab669e 100644 --- a/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/terminal/PowerShellConsoleTerminalRunner.kt +++ b/src/main/kotlin/com/intellij/plugin/powershell/lang/lsp/languagehost/terminal/PowerShellConsoleTerminalRunner.kt @@ -3,9 +3,9 @@ package com.intellij.plugin.powershell.lang.lsp.languagehost.terminal import com.intellij.execution.Executor import com.intellij.execution.TaskExecutor import com.intellij.execution.executors.DefaultRunExecutor -import com.intellij.execution.process.ProcessAdapter import com.intellij.execution.process.ProcessEvent import com.intellij.execution.process.ProcessHandler +import com.intellij.execution.process.ProcessListener import com.intellij.execution.process.ProcessWaitFor import com.intellij.execution.ui.RunContentDescriptor import com.intellij.execution.ui.RunContentManager @@ -181,7 +181,7 @@ class PSPtyProcessHandler(private val myPowerShellConsoleRunner: PowerShellConso private val myWaitFor: ProcessWaitFor = ProcessWaitFor(myProcess, this, presentableName) override fun startNotify() { - addProcessListener(object : ProcessAdapter() { + addProcessListener(object : ProcessListener { override fun startNotified(event: ProcessEvent) { try { myWaitFor.setTerminationCallback { integer -> notifyProcessTerminated(integer!!) }