Skip to content

Commit

Permalink
Move to LSP4j 0.13.0
Browse files Browse the repository at this point in the history
Fixes #1204

Signed-off-by: azerr <azerr@redhat.com>
  • Loading branch information
azerr authored and angelozerr committed May 25, 2022
1 parent 65dc7dc commit 73b2f01
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 29 deletions.
Expand Up @@ -67,6 +67,7 @@
import org.eclipse.lsp4j.MessageType;
import org.eclipse.lsp4j.Position;
import org.eclipse.lsp4j.ServerCapabilities;
import org.eclipse.lsp4j.SetTraceParams;
import org.eclipse.lsp4j.TextDocumentPositionParams;
import org.eclipse.lsp4j.services.LanguageClient;
import org.eclipse.lsp4j.services.TextDocumentService;
Expand Down Expand Up @@ -348,4 +349,9 @@ public TelemetryManager getTelemetryManager() {
return telemetryManager;
}

@Override
public void setTrace(SetTraceParams params) {
// to avoid having error in vscode, the method is implemented
// FIXME : implement the behavior of this method.
}
}
Expand Up @@ -25,8 +25,6 @@
import org.eclipse.lsp4j.DidChangeWorkspaceFoldersParams;
import org.eclipse.lsp4j.ExecuteCommandParams;
import org.eclipse.lsp4j.FileEvent;
import org.eclipse.lsp4j.SymbolInformation;
import org.eclipse.lsp4j.WorkspaceSymbolParams;
import org.eclipse.lsp4j.jsonrpc.CompletableFutures;
import org.eclipse.lsp4j.jsonrpc.ResponseErrorException;
import org.eclipse.lsp4j.jsonrpc.messages.ResponseError;
Expand All @@ -48,11 +46,6 @@ public XMLWorkspaceService(XMLLanguageServer xmlLanguageServer) {
this.commands = new HashMap<>();
}

@Override
public CompletableFuture<List<? extends SymbolInformation>> symbol(WorkspaceSymbolParams params) {
return null;
}

@Override
public CompletableFuture<Object> executeCommand(ExecuteCommandParams params) {
synchronized (commands) {
Expand Down Expand Up @@ -85,7 +78,8 @@ public void didChangeConfiguration(DidChangeConfigurationParams params) {

@Override
public void didChangeWorkspaceFolders(DidChangeWorkspaceFoldersParams params) {
xmlLanguageServer.getXMLLanguageService().getWorkspaceServiceParticipants().forEach(participant -> participant.didChangeWorkspaceFolders(params));
xmlLanguageServer.getXMLLanguageService().getWorkspaceServiceParticipants()
.forEach(participant -> participant.didChangeWorkspaceFolders(params));
}

@Override
Expand Down
Expand Up @@ -60,8 +60,6 @@
*/
public class XMLLanguageService extends XMLExtensionsRegistry implements IXMLFullFormatter {

private static final String XML_DIAGNOSTIC_SOURCE = "xml";

private static final CancelChecker NULL_CHECKER = new CancelChecker() {

@Override
Expand Down
Expand Up @@ -68,6 +68,7 @@
import org.eclipse.lsp4j.RegistrationParams;
import org.eclipse.lsp4j.Unregistration;
import org.eclipse.lsp4j.UnregistrationParams;
import org.eclipse.lsp4j.jsonrpc.messages.Either;
import org.eclipse.lsp4j.services.LanguageClient;

/**
Expand Down Expand Up @@ -185,8 +186,8 @@ public void initializeCapabilities() {

private void registerWatchedFiles() {
List<FileSystemWatcher> watchers = new ArrayList<>(2);
watchers.add(new FileSystemWatcher("**/*.xsd"));
watchers.add(new FileSystemWatcher("**/*.dtd"));
watchers.add(new FileSystemWatcher(Either.forLeft("**/*.xsd")));
watchers.add(new FileSystemWatcher(Either.forLeft("**/*.dtd")));
DidChangeWatchedFilesRegistrationOptions options = new DidChangeWatchedFilesRegistrationOptions(watchers);
registerCapability(WORKSPACE_WATCHED_FILES_ID, WORKSPACE_WATCHED_FILES, options);
}
Expand Down
Expand Up @@ -716,6 +716,14 @@
"name": "org.eclipse.lsp4j.CompletionList",
"allDeclaredFields": true
},
{
"name": "org.eclipse.lsp4j.CompletionListCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.CompletionOptions",
"allDeclaredFields": true,
Expand Down Expand Up @@ -802,6 +810,14 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.DiagnosticCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.DiagnosticRelatedInformation",
"allDeclaredFields": true,
Expand Down Expand Up @@ -834,6 +850,14 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.DiagnosticWorkspaceCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.DidChangeConfigurationCapabilities",
"allDeclaredFields": true,
Expand Down Expand Up @@ -1100,6 +1124,22 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.FoldingRangeKindSupportCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.FoldingRangeSupportCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.FoldingRangeProviderOptions",
"allDeclaredFields": true,
Expand Down Expand Up @@ -1180,6 +1220,48 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.InlayHintCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.InlayHintResolveSupportCapabilities",
"allDeclaredFields": true,
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
},
{
"name": "org.eclipse.lsp4j.InlayHintWorkspaceCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.InlineValueCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.InlineValueWorkspaceCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.InsertTextFormat",
"allDeclaredFields": true
Expand Down Expand Up @@ -1418,14 +1500,6 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.ResourceChange",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.ResourceOperation",
"allDeclaredFields": true
Expand Down Expand Up @@ -1552,6 +1626,14 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.StaleRequestCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.StaticRegistrationOptions",
"allDeclaredFields": true,
Expand Down Expand Up @@ -1772,8 +1854,16 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.WorkspaceServerCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.WorkspaceServerCapabilities",
"name": "org.eclipse.lsp4j.WorkspaceSymbolResolveSupportCapabilities",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
Expand All @@ -1787,6 +1877,13 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.CompletionItemDefaultsEditRangeTypeAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.CompletionItemTextEditTypeAdapter",
"methods": [{
Expand Down Expand Up @@ -1836,13 +1933,13 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.ResourceChangeListAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.ProgressNotificationAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.ResourceOperationTypeAdapter",
"methods": [{
Expand Down Expand Up @@ -1871,6 +1968,27 @@
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.WorkDoneProgressNotificationAdapter$Factory",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.WorkspaceSymbolLocationTypeAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.adapters.WorkspaceSymbolResponseAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
{
"name": "org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter$Factory",
"methods": [{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -8,7 +8,7 @@
<description>LemMinX is a XML Language Server Protocol (LSP), and can be used with any editor that supports LSP, to offer an outstanding XML editing experience</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lsp4j.version>0.11.0</lsp4j.version>
<lsp4j.version>0.13.0</lsp4j.version>
<junit.version>5.6.1</junit.version>
</properties>
<url>https://github.com/eclipse/lemminx</url>
Expand Down

0 comments on commit 73b2f01

Please sign in to comment.