From 3e3c01f5d62bceebff4068a1cd1f8dafdf4de5e0 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Thu, 14 Nov 2024 13:10:31 +0100 Subject: [PATCH 1/3] upgrade intellij --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 8a77722b..7f418ee5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -22,7 +22,7 @@ plugins { group = "com.emberjs" -version = "2024.3.4" +version = "2024.3.5" dependencies { testImplementation("org.jetbrains.kotlin:kotlin-test") @@ -41,7 +41,7 @@ dependencies { zipSigner() instrumentationTools() testFramework(TestFrameworkType.Platform) - create(IntelliJPlatformType.IntellijIdeaUltimate, "2024.2.4") + create(IntelliJPlatformType.IntellijIdeaUltimate, "2024.3") } } From d6a986857d9460ed364fa606df87f13be7cf8a74 Mon Sep 17 00:00:00 2001 From: Patrick Pircher Date: Thu, 14 Nov 2024 13:17:07 +0100 Subject: [PATCH 2/3] use JavaScriptBundle --- .../hbs/linter/ember-template-lint/TemplateLintEnabler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/emberjs/hbs/linter/ember-template-lint/TemplateLintEnabler.kt b/src/main/kotlin/com/emberjs/hbs/linter/ember-template-lint/TemplateLintEnabler.kt index 529d30b5..38a13461 100644 --- a/src/main/kotlin/com/emberjs/hbs/linter/ember-template-lint/TemplateLintEnabler.kt +++ b/src/main/kotlin/com/emberjs/hbs/linter/ember-template-lint/TemplateLintEnabler.kt @@ -1,5 +1,5 @@ import com.intellij.javascript.nodejs.PackageJsonData -import com.intellij.lang.javascript.JSBundle +import com.intellij.lang.javascript.JavaScriptBundle import com.intellij.lang.javascript.linter.JSLinterGuesser import com.intellij.lang.javascript.linter.JSLinterUtil import com.intellij.notification.Notification @@ -62,7 +62,7 @@ class TemplateLintEnabler : DirectoryProjectConfigurator { } fun notifyEnabled(project: Project, dependency: String) { - val message = JSBundle.message("js.linter.guesser.linter.enabled.because.of.package.json.section", + val message = JavaScriptBundle.message("js.linter.guesser.linter.enabled.because.of.package.json.section", "TemplateLint", dependency) @@ -70,7 +70,7 @@ class TemplateLintEnabler : DirectoryProjectConfigurator { override fun actionPerformed(e: AnActionEvent, notification: Notification) { JSLinterGuesser.LOG.info("TemplateLint disabled by user") templateLintEnabled(project, false) - JSLinterUtil.NOTIFICATION_GROUP.createNotification(JSBundle.message("js.linter.guesser.linter.disabled", "TemplateLint"), MessageType.INFO).notify(project) + JSLinterUtil.NOTIFICATION_GROUP.createNotification(JavaScriptBundle.message("js.linter.guesser.linter.disabled", "TemplateLint"), MessageType.INFO).notify(project) } }).notify(project) } From 36c9238d9d87594bebce7c6307fdb6d888536fdd Mon Sep 17 00:00:00 2001 From: patrickpircher Date: Thu, 14 Nov 2024 13:58:06 +0100 Subject: [PATCH 3/3] fix --- build.gradle.kts | 2 +- src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 7f418ee5..91fc5870 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,7 @@ dependencies { // and https://www.jetbrains.com/intellij-repository/snapshots/ // https://plugins.jetbrains.com/plugin/6884-handlebars-mustache/versions/stable intellijPlatform { - plugins(listOf("com.dmarcotte.handlebars:242.21829.3")) + plugins(listOf("com.dmarcotte.handlebars:243.21565.122")) bundledPlugins(listOf("JavaScript", "com.intellij.css", "org.jetbrains.plugins.yaml")) pluginVerifier() zipSigner() diff --git a/src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt b/src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt index 32cce8b1..513db7ff 100644 --- a/src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt +++ b/src/main/kotlin/com/emberjs/glint/GlintLanguageService.kt @@ -20,6 +20,7 @@ import com.intellij.lang.javascript.integration.JSAnnotationError import com.intellij.lang.javascript.integration.JSAnnotationError.* import com.intellij.lang.javascript.psi.JSFile import com.intellij.lang.javascript.psi.JSFunctionType +import com.intellij.lang.javascript.service.JSLanguageService import com.intellij.lang.javascript.service.JSLanguageServiceProvider import com.intellij.lang.parameterInfo.CreateParameterInfoContext import com.intellij.lang.typescript.compiler.TypeScriptService @@ -60,8 +61,8 @@ class GlintLanguageServiceProvider(val project: Project) : JSLanguageServiceProv override fun getService(file: VirtualFile) = allServices.firstOrNull() - override fun getAllServices() = - if (EmberUtils.isEnabledEmberProject(project)) listOf(GlintTypeScriptService.getInstance(project)) else emptyList() + override val allServices: List + get() = if (EmberUtils.isEnabledEmberProject(project)) listOf(GlintTypeScriptService.getInstance(project)) else emptyList() }