From b2af512356dc745eace68a3859633625d4c35847 Mon Sep 17 00:00:00 2001 From: Julian Valentin Date: Sat, 28 Mar 2020 11:17:40 +0100 Subject: [PATCH] Fix compatibility with updated lsp4j (LSP 3.15) --- .../FullTextDocumentService.java | 11 ++++------- src/main/resources/MessagesBundle.properties | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/bsplines/languagetool_languageserver/FullTextDocumentService.java b/src/main/java/org/bsplines/languagetool_languageserver/FullTextDocumentService.java index 19d7e32a..e3e6e5b2 100644 --- a/src/main/java/org/bsplines/languagetool_languageserver/FullTextDocumentService.java +++ b/src/main/java/org/bsplines/languagetool_languageserver/FullTextDocumentService.java @@ -37,17 +37,17 @@ public CompletableFuture resolveCompletionItem(CompletionItem un } @Override - public CompletableFuture hover(TextDocumentPositionParams position) { + public CompletableFuture hover(HoverParams position) { return null; } @Override - public CompletableFuture signatureHelp(TextDocumentPositionParams position) { + public CompletableFuture signatureHelp(SignatureHelpParams position) { return null; } @Override - public CompletableFuture,List>> definition(TextDocumentPositionParams position) { + public CompletableFuture,List>> definition(DefinitionParams position) { return null; } @@ -57,7 +57,7 @@ public CompletableFuture> references(ReferenceParams pa } @Override - public CompletableFuture> documentHighlight(TextDocumentPositionParams position) { + public CompletableFuture> documentHighlight(DocumentHighlightParams position) { return null; } @@ -114,9 +114,6 @@ public void didChange(DidChangeTextDocumentParams params) { if (changeEvent.getRange() != null) { throw new UnsupportedOperationException(Tools.i18n("rangeShouldBeNull")); } - if (changeEvent.getRangeLength() != null) { - throw new UnsupportedOperationException(Tools.i18n("rangeLengthShouldBeNull")); - } documents.get(uri).setText(changeEvent.getText()); documents.get(uri).setVersion(params.getTextDocument().getVersion()); diff --git a/src/main/resources/MessagesBundle.properties b/src/main/resources/MessagesBundle.properties index 5e1c978b..05dfd795 100644 --- a/src/main/resources/MessagesBundle.properties +++ b/src/main/resources/MessagesBundle.properties @@ -17,7 +17,6 @@ latexAnnotatedTextBuilderPreventedInfiniteLoop = Prevented infinite loop in Late notARecognizedLanguage = {0} is not a recognized language. Leaving LanguageTool uninitialized, checking disabled. obtainedRuleMatch = Obtained 1 rule match obtainedRuleMatches = Obtained {0} rule matches -rangeLengthShouldBeNull = Range length should be null for full document update rangeShouldBeNull = Range should be null for full document update removedIgnoredRuleMatch = Removed 1 ignored rule match removedIgnoredRuleMatches = Removed {0} ignored rule matches