[gnome-builder/wip/chergert/lsp-plugin-loader] plugins/jdtls: port to generic LSP plugin



commit 6b0dd05787547f77ab4989bdf610ae6eb08efda1
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 14 10:10:35 2022 -0500

    plugins/jdtls: port to generic LSP plugin

 src/plugins/jdtls/gbp-jdtls-code-action-provider.c | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-code-action-provider.h | 31 ----------
 src/plugins/jdtls/gbp-jdtls-completion-provider.c  | 61 -------------------
 src/plugins/jdtls/gbp-jdtls-completion-provider.h  | 31 ----------
 src/plugins/jdtls/gbp-jdtls-diagnostic-provider.c  | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-diagnostic-provider.h  | 31 ----------
 src/plugins/jdtls/gbp-jdtls-formatter.c            | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-formatter.h            | 31 ----------
 src/plugins/jdtls/gbp-jdtls-highlighter.c          | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-highlighter.h          | 31 ----------
 src/plugins/jdtls/gbp-jdtls-hover-provider.c       | 66 ---------------------
 src/plugins/jdtls/gbp-jdtls-hover-provider.h       | 31 ----------
 src/plugins/jdtls/gbp-jdtls-rename-provider.c      | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-rename-provider.h      | 31 ----------
 src/plugins/jdtls/gbp-jdtls-service.c              | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-service.h              | 31 ----------
 src/plugins/jdtls/gbp-jdtls-symbol-resolver.c      | 65 ---------------------
 src/plugins/jdtls/gbp-jdtls-symbol-resolver.h      | 31 ----------
 src/plugins/jdtls/jdtls-plugin.c                   | 68 ----------------------
 src/plugins/jdtls/jdtls.gresource.xml              |  1 +
 src/plugins/jdtls/jdtls.plugin                     | 13 +++--
 src/plugins/jdtls/meson.build                      | 13 -----
 src/plugins/jdtls/settings.json                    |  4 ++
 23 files changed, 13 insertions(+), 947 deletions(-)
---
diff --git a/src/plugins/jdtls/jdtls.gresource.xml b/src/plugins/jdtls/jdtls.gresource.xml
index 7ac83aef8..b116ee845 100644
--- a/src/plugins/jdtls/jdtls.gresource.xml
+++ b/src/plugins/jdtls/jdtls.gresource.xml
@@ -2,5 +2,6 @@
 <gresources>
   <gresource prefix="/plugins/jdtls">
     <file>jdtls.plugin</file>
+    <file>settings.json</file>
   </gresource>
 </gresources>
diff --git a/src/plugins/jdtls/jdtls.plugin b/src/plugins/jdtls/jdtls.plugin
index f6ca24ab9..088c78f59 100644
--- a/src/plugins/jdtls/jdtls.plugin
+++ b/src/plugins/jdtls/jdtls.plugin
@@ -2,15 +2,18 @@
 Builtin=true
 Copyright=Copyright © 2022 Christian Hergert
 Description=Language server integration for the Java programming language using jdtls
-Embedded=_gbp_jdtls_register_types
+Embedded=ide_lsp_plugin_register_types
 Module=jdtls
-Name=Java Language Server
+Name=Java Language Server (jdtls)
 X-Category=lsps
+X-Code-Action-Languages=java
 X-Completion-Provider-Languages=java
-X-Symbol-Resolver-Languages=java
 X-Diagnostic-Provider-Languages=java
+X-Formatter-Languages=java
 X-Highlighter-Languages=java
 X-Hover-Provider-Languages=java
+X-LSP-Command=jdtls
+X-LSP-Languages=java
+X-LSP-Settings=settings.json
 X-Rename-Provider-Languages=java
-X-Formatter-Languages=java
-X-Code-Action-Languages=java
+X-Symbol-Resolver-Languages=java
diff --git a/src/plugins/jdtls/meson.build b/src/plugins/jdtls/meson.build
index 468441513..9f375c021 100644
--- a/src/plugins/jdtls/meson.build
+++ b/src/plugins/jdtls/meson.build
@@ -1,18 +1,5 @@
 if get_option('plugin_jdtls')
 
-plugins_sources += files([
-  'jdtls-plugin.c',
-  'gbp-jdtls-code-action-provider.c',
-  'gbp-jdtls-completion-provider.c',
-  'gbp-jdtls-diagnostic-provider.c',
-  'gbp-jdtls-formatter.c',
-  'gbp-jdtls-highlighter.c',
-  'gbp-jdtls-hover-provider.c',
-  'gbp-jdtls-rename-provider.c',
-  'gbp-jdtls-symbol-resolver.c',
-  'gbp-jdtls-service.c',
-])
-
 plugin_jdtls_resources = gnome.compile_resources(
   'jdtls-resources',
   'jdtls.gresource.xml',
diff --git a/src/plugins/jdtls/settings.json b/src/plugins/jdtls/settings.json
new file mode 100644
index 000000000..07e323860
--- /dev/null
+++ b/src/plugins/jdtls/settings.json
@@ -0,0 +1,4 @@
+{
+  "jdtls" : {
+  }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]