Skip to content

Commit c706d6b

Browse files
committed
refactor: use OSProcessStreamConnectionProvider
Signed-off-by: azerr <azerr@redhat.com>
1 parent f669171 commit c706d6b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main/java/com/redhat/devtools/intellij/quarkus/lsp/QuarkusServer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
******************************************************************************/
1111
package com.redhat.devtools.intellij.quarkus.lsp;
1212

13+
import com.intellij.execution.configurations.GeneralCommandLine;
1314
import com.intellij.ide.plugins.IdeaPluginDescriptor;
1415
import com.intellij.ide.plugins.PluginManagerCore;
1516
import com.intellij.openapi.extensions.PluginId;
@@ -18,6 +19,7 @@
1819
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryEventName;
1920
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryManager;
2021
import com.redhat.devtools.lsp4ij.server.JavaProcessCommandBuilder;
22+
import com.redhat.devtools.lsp4ij.server.OSProcessStreamConnectionProvider;
2123
import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider;
2224
import com.redhat.devtools.intellij.lsp4mp4ij.settings.UserDefinedMicroProfileSettings;
2325
import org.slf4j.Logger;
@@ -33,9 +35,7 @@
3335
/**
3436
* Start the MicroProfile language server process with the Quarkus extension.
3537
*/
36-
public class QuarkusServer extends ProcessStreamConnectionProvider {
37-
38-
private static final Logger LOGGER = LoggerFactory.getLogger(QuarkusServer.class);
38+
public class QuarkusServer extends OSProcessStreamConnectionProvider {
3939

4040
private final Project project;
4141

@@ -54,7 +54,7 @@ public QuarkusServer(Project project) {
5454
.create();
5555
commands.add("org.eclipse.lsp4mp.ls.MicroProfileServerLauncher");
5656
commands.add("-DrunAsync=true");
57-
super.setCommands(commands);
57+
super.setCommandLine(new GeneralCommandLine(commands));
5858

5959
// Send "ls-start" telemetry event
6060
TelemetryManager.instance().send(TelemetryEventName.LSP_START_MICROPROFILE_SERVER);

src/main/java/com/redhat/devtools/intellij/qute/lsp/QuteServer.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
******************************************************************************/
1111
package com.redhat.devtools.intellij.qute.lsp;
1212

13+
import com.intellij.execution.configurations.GeneralCommandLine;
1314
import com.intellij.ide.plugins.IdeaPluginDescriptor;
1415
import com.intellij.ide.plugins.PluginManagerCore;
1516
import com.intellij.openapi.extensions.PluginId;
@@ -18,6 +19,7 @@
1819
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryEventName;
1920
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryManager;
2021
import com.redhat.devtools.lsp4ij.server.JavaProcessCommandBuilder;
22+
import com.redhat.devtools.lsp4ij.server.OSProcessStreamConnectionProvider;
2123
import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider;
2224
import com.redhat.devtools.intellij.qute.settings.UserDefinedQuteSettings;
2325
import org.slf4j.Logger;
@@ -32,9 +34,7 @@
3234
/**
3335
* Start the Qute language server process.
3436
*/
35-
public class QuteServer extends ProcessStreamConnectionProvider {
36-
37-
private static final Logger LOGGER = LoggerFactory.getLogger(QuteServer.class);
37+
public class QuteServer extends OSProcessStreamConnectionProvider {
3838

3939
private final Project project;
4040

@@ -50,7 +50,7 @@ public QuteServer(Project project) {
5050
.setJar(quteServerPath.toString())
5151
.create();
5252
commands.add("-DrunAsync=true");
53-
super.setCommands(commands);
53+
super.setCommandLine(new GeneralCommandLine(commands));
5454

5555
// Send "ls-startQute" telemetry event
5656
TelemetryManager.instance().send(TelemetryEventName.LSP_START_QUTE_SERVER);

0 commit comments

Comments
 (0)