From dcd5beae637c6f24501eb7d2924b60ed86ae2f2e Mon Sep 17 00:00:00 2001 From: azerr Date: Mon, 16 Sep 2024 22:28:03 +0200 Subject: [PATCH] chore: compatibility with 2024.3 Signed-off-by: azerr --- .../quarkus/QuarkusPostStartupActivity.java | 2 -- .../QuarkusJsonSchemaProjectService.java} | 14 +++++++------- .../quarkus/json/QuarkusJsonSchemaProvider.java | 3 +-- src/main/resources/META-INF/plugin-json.xml | 6 ++++++ src/main/resources/META-INF/plugin.xml | 1 - 5 files changed, 14 insertions(+), 12 deletions(-) rename src/main/java/com/redhat/devtools/intellij/quarkus/{QuarkusProjectService.java => json/QuarkusJsonSchemaProjectService.java} (90%) diff --git a/src/main/java/com/redhat/devtools/intellij/quarkus/QuarkusPostStartupActivity.java b/src/main/java/com/redhat/devtools/intellij/quarkus/QuarkusPostStartupActivity.java index 8d2afa973..fcc47645d 100644 --- a/src/main/java/com/redhat/devtools/intellij/quarkus/QuarkusPostStartupActivity.java +++ b/src/main/java/com/redhat/devtools/intellij/quarkus/QuarkusPostStartupActivity.java @@ -13,7 +13,6 @@ import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.ProjectActivity; -import com.intellij.openapi.startup.StartupActivity; import com.redhat.devtools.intellij.lsp4mp4ij.classpath.ClasspathResourceChangedManager; import com.redhat.devtools.intellij.lsp4mp4ij.psi.core.project.PsiMicroProfileProjectManager; import com.redhat.devtools.intellij.quarkus.run.QuarkusRunConfigurationManager; @@ -36,7 +35,6 @@ public Object execute(@NotNull Project project, @NotNull Continuation> schemas = new ConcurrentHashMap<>(); - public static QuarkusProjectService getInstance(@NotNull Project project) { - return project.getService(QuarkusProjectService.class); + public static QuarkusJsonSchemaProjectService getInstance(@NotNull Project project) { + return project.getService(QuarkusJsonSchemaProjectService.class); } private final MessageBusConnection connection; - public QuarkusProjectService(Project project) { + public QuarkusJsonSchemaProjectService(Project project) { connection = project.getMessageBus().connect(QuarkusPluginDisposable.getInstance(project)); connection.subscribe(ClasspathResourceChangedManager.TOPIC, this); } - public VirtualFile getSchema(Module module) { var schemaEntry = schemas.get(module); if (schemaEntry == null || !schemaEntry.getRight()) { diff --git a/src/main/java/com/redhat/devtools/intellij/quarkus/json/QuarkusJsonSchemaProvider.java b/src/main/java/com/redhat/devtools/intellij/quarkus/json/QuarkusJsonSchemaProvider.java index 384337199..33de71f58 100644 --- a/src/main/java/com/redhat/devtools/intellij/quarkus/json/QuarkusJsonSchemaProvider.java +++ b/src/main/java/com/redhat/devtools/intellij/quarkus/json/QuarkusJsonSchemaProvider.java @@ -16,7 +16,6 @@ import com.jetbrains.jsonSchema.extension.SchemaType; import com.redhat.devtools.lsp4ij.LSPIJUtils; import com.redhat.devtools.intellij.quarkus.QuarkusModuleUtil; -import com.redhat.devtools.intellij.quarkus.QuarkusProjectService; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -46,7 +45,7 @@ public String getName() { @Nullable @Override public VirtualFile getSchemaFile() { - return QuarkusProjectService.getInstance(module.getProject()).getSchema(module); + return QuarkusJsonSchemaProjectService.getInstance(module.getProject()).getSchema(module); } @NotNull diff --git a/src/main/resources/META-INF/plugin-json.xml b/src/main/resources/META-INF/plugin-json.xml index de5302142..ad3a2c837 100644 --- a/src/main/resources/META-INF/plugin-json.xml +++ b/src/main/resources/META-INF/plugin-json.xml @@ -1,4 +1,10 @@ + + + + + diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index dc42177d9..f269824c1 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -368,7 +368,6 @@ -