Skip to content

refactor: use OSProcessStreamConnectionProvider #1444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
******************************************************************************/
package com.redhat.devtools.intellij.quarkus.lsp;

import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManagerCore;
import com.intellij.openapi.extensions.PluginId;
Expand All @@ -18,6 +19,7 @@
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryEventName;
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryManager;
import com.redhat.devtools.lsp4ij.server.JavaProcessCommandBuilder;
import com.redhat.devtools.lsp4ij.server.OSProcessStreamConnectionProvider;
import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider;
import com.redhat.devtools.intellij.lsp4mp4ij.settings.UserDefinedMicroProfileSettings;
import org.slf4j.Logger;
Expand All @@ -33,9 +35,7 @@
/**
* Start the MicroProfile language server process with the Quarkus extension.
*/
public class QuarkusServer extends ProcessStreamConnectionProvider {

private static final Logger LOGGER = LoggerFactory.getLogger(QuarkusServer.class);
public class QuarkusServer extends OSProcessStreamConnectionProvider {

private final Project project;

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

// Send "ls-start" telemetry event
TelemetryManager.instance().send(TelemetryEventName.LSP_START_MICROPROFILE_SERVER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
******************************************************************************/
package com.redhat.devtools.intellij.qute.lsp;

import com.intellij.execution.configurations.GeneralCommandLine;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManagerCore;
import com.intellij.openapi.extensions.PluginId;
Expand All @@ -18,6 +19,7 @@
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryEventName;
import com.redhat.devtools.intellij.quarkus.telemetry.TelemetryManager;
import com.redhat.devtools.lsp4ij.server.JavaProcessCommandBuilder;
import com.redhat.devtools.lsp4ij.server.OSProcessStreamConnectionProvider;
import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider;
import com.redhat.devtools.intellij.qute.settings.UserDefinedQuteSettings;
import org.slf4j.Logger;
Expand All @@ -32,9 +34,7 @@
/**
* Start the Qute language server process.
*/
public class QuteServer extends ProcessStreamConnectionProvider {

private static final Logger LOGGER = LoggerFactory.getLogger(QuteServer.class);
public class QuteServer extends OSProcessStreamConnectionProvider {

private final Project project;

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

// Send "ls-startQute" telemetry event
TelemetryManager.instance().send(TelemetryEventName.LSP_START_QUTE_SERVER);
Expand Down
Loading