-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32668 from vespa-engine/theodorkl/LSP4IJ
Theodorkl/lsp4 ij
- Loading branch information
Showing
12 changed files
with
65 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...er/clients/intellij/src/main/java/ai/vespa/schemals/intellij/SchemaLanguageServer4IJ.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package ai.vespa.schemals.intellij; | ||
|
||
import com.intellij.openapi.project.Project; | ||
import com.redhat.devtools.lsp4ij.server.JavaProcessCommandBuilder; | ||
import com.redhat.devtools.lsp4ij.server.ProcessStreamConnectionProvider; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
import com.intellij.openapi.extensions.PluginId; | ||
import com.intellij.ide.plugins.PluginManagerCore; | ||
|
||
public class SchemaLanguageServer4IJ extends ProcessStreamConnectionProvider { | ||
|
||
public SchemaLanguageServer4IJ(Project project) { | ||
PluginId id = PluginId.getId("ai.vespa"); | ||
var plugin = PluginManagerCore.getPlugin(id); | ||
if (plugin == null) { | ||
throw new IllegalStateException("Plugin " + id + " not found. Cannot start the Vespa Schema Language Support plugin."); | ||
} | ||
var pluginPath = plugin.getPluginPath(); | ||
|
||
var serverPath = pluginPath | ||
.resolve("schema-language-server-jar-with-dependencies.jar") | ||
.toAbsolutePath() | ||
.toString(); | ||
|
||
List<String> commands = new JavaProcessCommandBuilder(project, "vespaSchemaLanguageServer") | ||
.setJar(serverPath) | ||
.create(); | ||
super.setCommands(commands); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...lients/intellij/src/main/java/ai/vespa/schemals/intellij/SchemaLanguageServerFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ai.vespa.schemals.intellij; | ||
|
||
import com.intellij.openapi.project.Project; | ||
import com.redhat.devtools.lsp4ij.LanguageServerFactory; | ||
import com.redhat.devtools.lsp4ij.client.LanguageClientImpl; | ||
import com.redhat.devtools.lsp4ij.server.StreamConnectionProvider; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class SchemaLanguageServerFactory implements LanguageServerFactory { | ||
@Override | ||
public @NotNull StreamConnectionProvider createConnectionProvider(@NotNull Project project) { | ||
return new SchemaLanguageServer4IJ(project); | ||
} | ||
} |
69 changes: 0 additions & 69 deletions
69
...er/clients/intellij/src/main/java/ai/vespa/schemals/intellij/SchemaSyntaxHighlighter.java
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
...er/clients/intellij/src/main/java/ai/vespa/schemals/intellij/settings/SchemaSettings.java
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
...s/intellij/src/main/java/ai/vespa/schemals/intellij/settings/SchemaSettingsComponent.java
This file was deleted.
Oops, something went wrong.
61 changes: 0 additions & 61 deletions
61
...ntellij/src/main/java/ai/vespa/schemals/intellij/settings/SchemaSettingsConfigurable.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.