Update LSP4J in LS to 0.7.2
This commit is contained in:
@@ -40,6 +40,7 @@ import org.eclipse.lsp4j.DocumentSymbol;
|
||||
import org.eclipse.lsp4j.DocumentSymbolParams;
|
||||
import org.eclipse.lsp4j.Hover;
|
||||
import org.eclipse.lsp4j.Location;
|
||||
import org.eclipse.lsp4j.LocationLink;
|
||||
import org.eclipse.lsp4j.PublishDiagnosticsParams;
|
||||
import org.eclipse.lsp4j.Range;
|
||||
import org.eclipse.lsp4j.ReferenceParams;
|
||||
@@ -344,14 +345,17 @@ public class SimpleTextDocumentService implements TextDocumentService, DocumentE
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<List<? extends Location>> definition(TextDocumentPositionParams position) {
|
||||
return async.invoke(() -> {
|
||||
public CompletableFuture<Either<List<? extends Location>, List<? extends LocationLink>>> definition(
|
||||
TextDocumentPositionParams position) {
|
||||
|
||||
DefinitionHandler h = this.definitionHandler;
|
||||
if (h!=null) {
|
||||
return h.handle(position);
|
||||
if (h != null) {
|
||||
return async.invoke(() -> {
|
||||
List<Location> locations = h.handle(position);
|
||||
return Either.<List<? extends Location>, List<? extends LocationLink>>forLeft(locations);
|
||||
});
|
||||
}
|
||||
return Collections.emptyList();
|
||||
});
|
||||
return CompletableFuture.completedFuture(Either.forLeft(ImmutableList.of()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -729,7 +729,7 @@ public class LanguageServerHarness {
|
||||
|
||||
public List<? extends Location> getDefinitions(TextDocumentPositionParams params) throws Exception {
|
||||
waitForReconcile(); //goto definitions relies on reconciler infos! Must wait or race condition breaking tests occasionally.
|
||||
return getServer().getTextDocumentService().definition(params).get();
|
||||
return getServer().getTextDocumentService().definition(params).get().getLeft();
|
||||
}
|
||||
|
||||
public static void assertDocumentation(String expected, CompletionItem completion) {
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
<mockito-version>1.10.19</mockito-version>
|
||||
<jackson-2-version>2.5.0</jackson-2-version>
|
||||
<jersey-2-version>2.10</jersey-2-version>
|
||||
<lsp4j-version>0.6.0</lsp4j-version>
|
||||
<lsp4j-version>0.7.2</lsp4j-version>
|
||||
<cglib-version>3.2.7</cglib-version>
|
||||
<!-- NOTE: Reactor version must match version used by the CF client -->
|
||||
<cloudfoundry-client-version>3.8.0.RELEASE</cloudfoundry-client-version>
|
||||
|
||||
Reference in New Issue
Block a user