diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a58d55..e5f6d125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,13 @@ Breaking API changes: * Method `LanguageClient.setTrace` moved to `LanguageServer`, where it should have been according to the specification - * Removed `RenameOptions.id` as it was never specified for `StaticRegistrationOptions` + * Removed `RenameOptions.id` as it was already deprecated and never specified for `StaticRegistrationOptions` + * Removed `SemanticTokenTypes.Member` as it was already deprecated and not specified + * Removed `TraceValue.Message` as it was already deprecated and not specified + * Changed `TraceValue` to be `final` matching similar classes + * Removed duplicate `ResponseErrorCode` as it has been deprecated for several versions + * Removed `ResponseErrorCode.serverErrorStart` and `ResponseErrorCode.serverErrorEnd` as they were + already deprecated and just boundaries not actual error codes * Return type of `workspace/symbol` changed from `List` to `Either, List>` * Type of `FileSystemWatcher.globPattern` changed from `String` to `Either` @@ -25,6 +31,7 @@ Breaking Beta API changes: Deprecated API changes: * `SymbolInformation` is deprecated in favor of `DocumentSymbol` or `WorkspaceSymbol` + * `ResponseErrorCode.serverNotInitialized` deprecated in favor of `ResponseErrorCode.ServerNotInitialized` ### v0.12.0 (Apr. 2021) diff --git a/documentation/jsonrpc.md b/documentation/jsonrpc.md index 0248001e..daa4ce14 100644 --- a/documentation/jsonrpc.md +++ b/documentation/jsonrpc.md @@ -1,14 +1,14 @@ -# Core Concepts +# JSON-RPC Core Concepts -The LSP is based on an extended version of [JSON RPC v2.0](http://www.jsonrpc.org/specification), for which LSP4J provides a Java implementation. There are basically three levels of interaction: +The LSP is based on an extended version of [JSON-RPC v2.0](http://www.jsonrpc.org/specification), for which LSP4J provides a Java implementation. There are basically three levels of interaction: -# Basic Message Sending +## Basic Message Sending -On the lowest Level JSON RPC just sends messages from a client to a server. Those messages can be notifications, requests or responses. The relation between an incoming request and a sent response is done through a request id. As a user you usually don't want to do the wiring yourself, but want to work at least with an `Endpoint`. +On the lowest level, JSON-RPC just sends messages from a client to a server. Those messages can be notifications, requests, or responses. The relation between an incoming request and a sent response is done through a request `id`. As a user, you usually don't want to do the wiring yourself, but want to work at least with an `Endpoint`. -# Endpoint +## Endpoint -LSP4J provides the notion of an [Endpoint](../org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/Endpoint.java) that takes care of the connecting a request messages with responses. The interface defines two methods +LSP4J provides the notion of an [Endpoint](../org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/Endpoint.java) that takes care of the connecting a request messages with responses. The interface defines two methods: ``` java /** @@ -16,54 +16,53 @@ LSP4J provides the notion of an [Endpoint](../org.eclipse.lsp4j.jsonrpc/src/main */ public interface Endpoint { - CompletableFuture request(String method, Object parameter); - - void notify(String method, Object parameter); - + CompletableFuture request(String method, Object parameter); + + void notify(String method, Object parameter); + } ``` -# Notifications +## Notifications -You always work with two `Endpoints`. Usually one of the endpoints, a `RemoteEndpoint`, sits on some remote communication channel, like a socket and receives and sends json messages. A local `Endpoint` implementation is connected bidirectionally such that it can receive and send messages. For instance, when a notification messages comes in the `RemoteEndpoint` simply translates it to a call on your local Endpoint implementation. This simple approach works nicely in both directions. +You always work with two `Endpoints`. Usually one of the endpoints, a `RemoteEndpoint`, sits on some remote communication channel, like a socket and receives and sends json messages. A local `Endpoint` implementation is connected bidirectionally such that it can receive and send messages. For instance, when a notification messages comes in the `RemoteEndpoint` simply translates it to a call on your local `Endpoint` implementation. This simple approach works nicely in both directions. -# Requests +## Requests -For requests, the story is slightly more complicated. When a request message comes in, the `RemoteEndpoint` tracks the request `id` and invokes `request` on the local endpoint. In addition it adds completion stage to the returned `CompletableFuture`, that translates the result into a JSON RPC response message. +For requests, the story is slightly more complicated. When a request message comes in, the `RemoteEndpoint` tracks the request `id` and invokes `request` on the local endpoint. In addition, it adds completion stage to the returned `CompletableFuture`, that translates the result into a JSON-RPC response message. -For the other direction, if the implementation calls request on the RemoteEndpoint, the message is send and tracked locally. -The returned `CompletableFuture` will complete once a corresponsing result message is received. +For the other direction, if the implementation calls request on the RemoteEndpoint, the message is sent and tracked locally. The returned `CompletableFuture` will complete once a corresponding result message is received. ## Response Errors -The receiver of a request always needs to return a response message to conform to the JSON RPC specification. In case the result value cannot be provided in a response because of an error, the `error` property of the `ResponseMessage` must be set to a `ResponseError` describing the failure. +The receiver of a request always needs to return a response message to conform to the JSON-RPC specification. In case the result value cannot be provided in a response because of an error, the `error` property of the `ResponseMessage` must be set to a `ResponseError` describing the failure. This can be done by returning a `CompletableFuture` completed exceptionally with a `ResponseErrorException` from the request message handler in a local endpoint. The exception carries a `ResponseError` to attach to the response. The `RemoteEndpoint` will handle the exceptionally completed future and send a response message with the attached error object. For example: + ```java @Override public CompletableFuture shutdown() { if (!isInitialized()) { CompletableFuture exceptionalResult = new CompletableFuture<>(); - ResponseError error = new ResponseError(ResponseErrorCode.serverNotInitialized, "Server was not initialized", null); + ResponseError error = new ResponseError(ResponseErrorCode.ServerNotInitialized, "Server was not initialized", null); exceptionalResult.completeExceptionally(new ResponseErrorException(error)); - return exceptionalResult; + return exceptionalResult; } return doShutdown(); } ``` -# Cancelling Requests +## Cancelling Requests -The LSP defines an extension to the JSON RPC, that allows to cancel requests. It is done through a special notification message, that contains the request id that should be cancelled. If you want to cancel a pending request in LSP4J, you can simply call `cancel(true)` on the returned `CompletableFuture`. The `RemoteEndpoint` will send the cancellation notification. If you are implementing a request message, you should return a `CompletableFuture` created through [`CompletebleFutures.computeAsync`] (../org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/CompletableFutures.java#L24). It accepts a lambda that is provided with a `CancelChecker`, which you need to ask `checkCanceled` and which will throw a `CancellationException` in case the request got canceled. +The LSP defines an extension to the JSON-RPC, that allows to cancel requests. It is done through a special notification message, which contains the request `id` that should be cancelled. If you want to cancel a pending request in LSP4J, you can simply call `cancel(true)` on the returned `CompletableFuture`. The `RemoteEndpoint` will send the cancellation notification. If you are implementing a request message, you should return a `CompletableFuture` created through [`CompletableFutures.computeAsync`](../org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/CompletableFutures.java#L24). It accepts a lambda that is provided with a `CancelChecker`, which you need to ask `checkCanceled` and which will throw a `CancellationException` in case the request got canceled. ``` java @JsonRequest -public CompletableFuture completion( - TextDocumentPositionParams position) { +public CompletableFuture completion(TextDocumentPositionParams position) { return CompletableFutures.computeAsync(cancelToken -> { - // the actual implementation should check for + // the actual implementation should check for // cancellation like this cancelToken.checkCanceled(); // more code... and more cancel checking @@ -72,18 +71,18 @@ public CompletableFuture completion( } ``` -# Static Typing through Service Layer +## Static Typing through Service Layer -So far with `Endpoint` and `Object` as parameter and result the API is quite generic. In order to leverage Java's type system and tool support, the JSON RPC module supports the notion of service objects. +So far with `Endpoint` and `Object` as parameter and result the API is quite generic. In order to leverage Java's type system and tool support, the JSON-RPC module supports the notion of service objects. -# Service Objects +## Service Objects -A service object provides methods that are annotated with either `@JsonNotification` or `@JsonRequest`. A `GenericEndpoint` is a reflective implementation of an Endpoint, that simply delegates any calls to `request` or `notify` to the corresponding method in the service object. Here is a simple example: +A service object provides methods that are annotated with either `@JsonNotification` or `@JsonRequest`. A `GenericEndpoint` is a reflective implementation of an Endpoint that simply delegates any calls to `request` or `notify` to the corresponding method in the service object. Here is a simple example: ``` java public class MyService { @JsonNotification public void sayHello(HelloParam param) { - ... do stuff + // do stuff } } @@ -91,45 +90,43 @@ public class MyService { MyService service = new MyService(); Endpoint serviceAsEndpoint = ServiceEndpoints.toEndpoint(service); - ``` -If in turn you want to talk to an Endpoint in a more statically typed fashion, the `EndpointProxy` comes in handy. It is a dynamic proxy for a given service interface with annotated @JsonRequest and @JsonNotification methods. You can create one like this: +If in turn you want to talk to an Endpoint in a more statically typed fashion, the `EndpointProxy` comes in handy. It is a dynamic proxy for a given service interface with annotated `@JsonRequest` and `@JsonNotification` methods. You can create one like this: ``` java public interface MyService { @JsonNotification public void sayHello(HelloParam param); } - Endpoint endpoint = ... MyService proxy = ServiceEndpoints.toProxy(endpoint, MyService.class); ``` Of course you can use the same interface, as is done with the [interfaces](../org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/LanguageServer.java) defining the messages of the LSP. -# Naming of JSON RPC Request and Notifications +## Naming of JSON-RPC Request and Notifications -When annotated with @JsonRequest or @JsonNotification LSP4J will use the name of the annotated method to create the JSON RPC method name. This naming can be customized by using segments and providing explicit names in the annotations. Here are some examples of method naming options: +When annotated with `@JsonRequest` or `@JsonNotification` LSP4J will use the name of the annotated method to create the JSON-RPC method name. This naming can be customized by using segments and providing explicit names in the annotations. Here are some examples of method naming options: ```java @JsonSegment("mysegment") public interface NamingExample { - // The JSON RPC method name will be "mysegment/myrequest" - @JsonRequest - CompletableFuture myrequest(); + // The JSON-RPC method name will be "mysegment/myrequest" + @JsonRequest + CompletableFuture myrequest(); - // The JSON RPC method name will be "myotherrequest" - @JsonRequest(useSegment = false) - CompletableFuture myotherrequest(); + // The JSON-RPC method name will be "myotherrequest" + @JsonRequest(useSegment = false) + CompletableFuture myotherrequest(); - // The JSON RPC method name will be "mysegment/somethirdrequest" - @JsonRequest(value="somethirdrequest") - CompletableFuture notthesamenameasvalue(); + // The JSON-RPC method name will be "mysegment/somethirdrequest" + @JsonRequest(value="somethirdrequest") + CompletableFuture notthesamenameasvalue(); - // The JSON RPC method name will be "call/it/what/you/want" - @JsonRequest(value="call/it/what/you/want", useSegment = false) - CompletableFuture yetanothername(); + // The JSON-RPC method name will be "call/it/what/you/want" + @JsonRequest(value="call/it/what/you/want", useSegment = false) + CompletableFuture yetanothername(); } ``` diff --git a/org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/messages/ResponseErrorCode.java b/org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/messages/ResponseErrorCode.java index 14761c8c..94932e8a 100644 --- a/org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/messages/ResponseErrorCode.java +++ b/org.eclipse.lsp4j.jsonrpc/src/main/java/org/eclipse/lsp4j/jsonrpc/messages/ResponseErrorCode.java @@ -15,42 +15,58 @@ * A number indicating the error type that occurred. */ public enum ResponseErrorCode { - + + /** + * Invalid JSON was received by the server. An error occurred on + * the server while parsing the JSON text. + */ ParseError(-32700), - + + /** + * The JSON sent is not a valid Request object. + */ InvalidRequest(-32600), - + + /** + * The method does not exist / is not available. + */ MethodNotFound(-32601), - + + /** + * Invalid method parameter(s). + */ InvalidParams(-32602), - + + /** + * Internal JSON-RPC error. + */ InternalError(-32603), - + /** * This is the start range of JSON RPC reserved error codes. * It doesn't denote a real error code. No LSP error codes should * be defined between the start and end range. For backwards - * compatibility the {@link #serverNotInitialized} and the + * compatibility the {@link #ServerNotInitialized} and the * {@link #UnknownErrorCode} are left in the range. *

* Since 3.16.0 */ jsonrpcReservedErrorRangeStart(-32099), - - /** @deprecated use {@link #jsonrpcReservedErrorRangeStart} */ + + /** + * @deprecated Use {@link #ServerNotInitialized} + */ @Deprecated - serverErrorStart(-32099), - + serverNotInitialized(-32002), + /** * Error code indicating that a server received a notification or * request before the server has received the {@code initialize} request. - *

- * Should be {@code ServerNotInitialized} */ - serverNotInitialized(-32002), - + ServerNotInitialized(-32002), + UnknownErrorCode(-32001), - + /** * This is the end range of JSON RPC reserved error codes. * It doesn't denote a real error code. @@ -58,11 +74,7 @@ public enum ResponseErrorCode { * Since 3.16.0 */ jsonrpcReservedErrorRangeEnd(-32000), - - /** @deprecated use {@link #jsonrpcReservedErrorRangeEnd} */ - @Deprecated - serverErrorEnd(-32000), - + /** * This is the start range of LSP reserved error codes. * It doesn't denote a real error code. @@ -80,7 +92,7 @@ public enum ResponseErrorCode { * Since 3.17.0 */ RequestFailed(-32803), - + /** * The server cancelled the request. This error code should * only be used for requests that explicitly support being @@ -89,7 +101,7 @@ public enum ResponseErrorCode { * Since 3.17.0 */ ServerCancelled(-32802), - + /** * The server detected that the content of a document got * modified outside normal conditions. A server should @@ -101,13 +113,13 @@ public enum ResponseErrorCode { * the client should cancel the request. */ ContentModified(-32801), - + /** * The client has canceled a request and a server as detected * the cancel. */ RequestCancelled(-32800), - + /** * This is the end range of LSP reserved error codes. * It doesn't denote a real error code. @@ -115,13 +127,13 @@ public enum ResponseErrorCode { * Since 3.16.0 */ lspReservedErrorRangeEnd(-32800); - + private final int value; - + ResponseErrorCode(int value) { this.value = value; } - + public int getValue() { return value; } diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionItemTag.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionItemTag.java index 4ed12888..006d287e 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionItemTag.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionItemTag.java @@ -15,30 +15,30 @@ /** * Completion item tags are extra annotations that tweak the rendering of a completion * item. - * + *

* Since 3.15.0 */ public enum CompletionItemTag { - /** - * Render a completion as obsolete, usually using a strike-out. - */ - Deprecated(1); + /** + * Render a completion as obsolete, usually using a strike-out. + */ + Deprecated(1); - private final int value; + private final int value; - CompletionItemTag(int value) { - this.value = value; - } + CompletionItemTag(int value) { + this.value = value; + } - public int getValue() { - return value; - } + public int getValue() { + return value; + } - public static CompletionItemTag forValue(int value) { - CompletionItemTag[] allValues = CompletionItemTag.values(); - if (value < 1 || value > allValues.length) - throw new IllegalArgumentException("Illegal enum value: " + value); - return allValues[value - 1]; - } + public static CompletionItemTag forValue(int value) { + CompletionItemTag[] allValues = CompletionItemTag.values(); + if (value < 1 || value > allValues.length) + throw new IllegalArgumentException("Illegal enum value: " + value); + return allValues[value - 1]; + } } \ No newline at end of file diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionTriggerKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionTriggerKind.java index 02bb99d4..9e4f4bfe 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionTriggerKind.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/CompletionTriggerKind.java @@ -30,6 +30,8 @@ public enum CompletionTriggerKind { /** * Completion was re-triggered as the current completion list is incomplete. + *

+ * Since 3.6.0 */ TriggerForIncompleteCompletions(3); diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/DiagnosticTag.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/DiagnosticTag.java index f205e771..31ef7d6d 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/DiagnosticTag.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/DiagnosticTag.java @@ -14,40 +14,40 @@ /** * The diagnostic tags. - * + *

* Since 3.15.0 */ public enum DiagnosticTag { - /** - * Unused or unnecessary code. - * - * Clients are allowed to render diagnostics with this tag faded out instead of having - * an error squiggle. - */ - Unnecessary(1), - - /** - * Deprecated or obsolete code. - * - * Clients are allowed to rendered diagnostics with this tag strike through. - */ - Deprecated(2); - - private final int value; - - DiagnosticTag(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - - public static DiagnosticTag forValue(int value) { - DiagnosticTag[] allValues = DiagnosticTag.values(); - if (value < 1 || value > allValues.length) - throw new IllegalArgumentException("Illegal enum value: " + value); - return allValues[value - 1]; - } + /** + * Unused or unnecessary code. + * + * Clients are allowed to render diagnostics with this tag faded out instead of having + * an error squiggle. + */ + Unnecessary(1), + + /** + * Deprecated or obsolete code. + * + * Clients are allowed to rendered diagnostics with this tag strike through. + */ + Deprecated(2); + + private final int value; + + DiagnosticTag(int value) { + this.value = value; + } + + public int getValue() { + return value; + } + + public static DiagnosticTag forValue(int value) { + DiagnosticTag[] allValues = DiagnosticTag.values(); + if (value < 1 || value > allValues.length) + throw new IllegalArgumentException("Illegal enum value: " + value); + return allValues[value - 1]; + } } \ No newline at end of file diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FailureHandlingKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FailureHandlingKind.java deleted file mode 100644 index 7b0c832d..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FailureHandlingKind.java +++ /dev/null @@ -1,48 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2018 Microsoft Corporation and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ - -package org.eclipse.lsp4j; - -/** - * The kind of failure handling supported by the client. - */ -public final class FailureHandlingKind { - - private FailureHandlingKind() { - } - - /** - * Applying the workspace change is simply aborted if one of the changes - * provided fails. All operations executed before the failing operation stay - * executed. - */ - public static final String Abort = "abort"; - - /** - * All operations are executed transactional. That means they either all succeed - * or no changes at all are applied to the workspace. - */ - public static final String Transactional = "transactional"; - - /** - * If the workspace edit contains only textual file changes they are executed - * transactional. If resource changes (create, rename or delete file) are part - * of the change the failure handling strategy is abort. - */ - public static final String TextOnlyTransactional = "textOnlyTransactional"; - - /** - * The client tries to undo the operations already executed. But there is no - * guaruntee that this is succeeding. - */ - public static final String Undo = "undo"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FileOperationPatternKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FileOperationPatternKind.java deleted file mode 100644 index 0deda288..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/FileOperationPatternKind.java +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2020 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ -package org.eclipse.lsp4j; - -/** - * A pattern kind describing if a glob pattern matches a file a folder or - * both. - * - * Since 3.16.0 - */ -public final class FileOperationPatternKind { - - private FileOperationPatternKind() { - } - - /** - * The pattern matches a file only. - */ - public static final String File = "file"; - - /** - * The pattern matches a folder only. - */ - public static final String Folder = "folder"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextFormat.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextFormat.java index 38493383..efcc0ab6 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextFormat.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextFormat.java @@ -24,7 +24,7 @@ public enum InsertTextFormat { /** * The primary text to be inserted is treated as a snippet. - * + *

* A snippet can define tab stops and placeholders with `$1`, `$2` * and `${3:foo}`. `$0` defines the final tab stop, it defaults to * the end of the snippet. Placeholders with equal identifiers are linked, diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextMode.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextMode.java index 0bd53846..f52cc5fa 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextMode.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/InsertTextMode.java @@ -14,7 +14,7 @@ /** * How whitespace and indentation is handled during completion * item insertion. - * + *

* Since 3.16.0 */ public enum InsertTextMode { @@ -32,7 +32,7 @@ public enum InsertTextMode { * The editor adjusts leading whitespace of new lines so that * they match the indentation up to the cursor of the line for * which the item is accepted. - * + *

* Consider a line like this: [2tabs][cursor][3tabs]foo. Accepting a * multi line completion item is indented using 2 tabs and all * following lines inserted will be indented using 2 tabs as well. diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MarkupKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MarkupKind.java deleted file mode 100644 index 3f2d3531..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MarkupKind.java +++ /dev/null @@ -1,33 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2016 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ -package org.eclipse.lsp4j; - -/** - * Describes the content type that a client supports in various - * result literals like `Hover`, `ParameterInfo` or `CompletionItem`. - * - * Please note that `MarkupKind`s must not start with a `$`. These kinds - * are reserved for internal usage. - */ -public final class MarkupKind { - private MarkupKind() {} - - /** - * Plain text is supported as a content format. - */ - public static final String PLAINTEXT = "plaintext"; - - /** - * Markdown is supported as a content format. - */ - public static final String MARKDOWN = "markdown"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MonikerKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MonikerKind.java deleted file mode 100644 index d83db5e9..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/MonikerKind.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Copyright (c) 2020 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ - -package org.eclipse.lsp4j; - -/** - * The moniker kind. - * - * Since 3.16.0 - */ -public final class MonikerKind { - private MonikerKind() { - } - - /** - * The moniker represents a symbol that is imported into a project - */ - public static final String Import = "import"; - - /** - * The moniker represents a symbol that is exported from a project - */ - public static final String Export = "export"; - - /** - * The moniker represents a symbol that is local to a project (e.g. a local - * variable of a function, a class not visible outside the project, ...) - */ - public static final String Local = "local"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/PrepareSupportDefaultBehavior.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/PrepareSupportDefaultBehavior.java index 014f3d75..69aabd77 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/PrepareSupportDefaultBehavior.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/PrepareSupportDefaultBehavior.java @@ -14,7 +14,7 @@ /** * The value indicates the default behavior used by the * client. - * + *

* Since version 3.16.0 */ public enum PrepareSupportDefaultBehavior { diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/Protocol.xtend b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/Protocol.xtend index 011e3fd0..02ae5f48 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/Protocol.xtend +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/Protocol.xtend @@ -108,6 +108,67 @@ class WorkspaceEditCapabilities { } } +/** + * The kind of resource operations supported by the client. + *

+ * Since 3.13.0 + */ +final class ResourceOperationKind { + /** + * Supports creating new files and folders. + */ + public static val Create = 'create' + + /** + * Supports renaming existing files and folders. + */ + public static val Rename = 'rename' + + /** + * Supports deleting existing files and folders. + */ + public static val Delete = 'delete' + + private new() { + } +} + +/** + * The kind of failure handling supported by the client. + *

+ * Since 3.13.0 + */ +final class FailureHandlingKind { + /** + * Applying the workspace change is simply aborted if one of the changes + * provided fails. All operations executed before the failing operation stay + * executed. + */ + public static val Abort = 'abort' + + /** + * All operations are executed transactional. That means they either all succeed + * or no changes at all are applied to the workspace. + */ + public static val Transactional = 'transactional' + + /** + * If the workspace edit contains only textual file changes they are executed + * transactional. If resource changes (create, rename or delete file) are part + * of the change the failure handling strategy is abort. + */ + public static val TextOnlyTransactional = 'textOnlyTransactional' + + /** + * The client tries to undo the operations already executed. But there is no + * guarantee that this is succeeding. + */ + public static val Undo = 'undo' + + private new() { + } +} + /** * Capabilities specific to the `workspace/didChangeConfiguration` notification. */ @@ -178,6 +239,8 @@ class WorkspaceSymbolResolveSupportCapabilities { class SymbolCapabilities extends DynamicRegistrationCapabilities { /** * Specific capabilities for the {@link SymbolKind} in the {@code workspace/symbol} request. + *

+ * Since 3.4.0 */ SymbolKindCapabilities symbolKind @@ -383,22 +446,32 @@ class CompletionItemCapabilities { /** * Client supports commit characters on a completion item. + *

+ * Since 3.2.0 */ Boolean commitCharactersSupport /** * Client supports the following content formats for the documentation * property. The order describes the preferred format of the client. + *

+ * See {@link MarkupKind} for allowed values. + *

+ * Since 3.3.0 */ List documentationFormat /** * Client supports the deprecated property on a completion item. + *

+ * Since 3.8.0 */ Boolean deprecatedSupport /** * Client supports the preselect property on a completion item. + *

+ * Since 3.9.0 */ Boolean preselectSupport @@ -527,6 +600,8 @@ class CompletionItemInsertTextModeSupportCapabilities { /** * The client supports the following {@link CompletionItemKind} specific * capabilities. + *

+ * Since 3.4.0 */ @JsonRpcData class CompletionItemKindCapabilities { @@ -591,12 +666,16 @@ class CompletionCapabilities extends DynamicRegistrationCapabilities { /** * The client supports the following {@link CompletionItemKind} specific * capabilities. + *

+ * Since 3.4.0 */ CompletionItemKindCapabilities completionItemKind /** * The client supports sending additional context information for a * `textDocument/completion` request. + *

+ * Since 3.3.0 */ Boolean contextSupport @@ -645,6 +724,8 @@ class HoverCapabilities extends DynamicRegistrationCapabilities { * The order describes the preferred format of the client. *

* See {@link MarkupKind} for allowed values. + *

+ * Since 3.3.0 */ List contentFormat @@ -671,11 +752,15 @@ class SignatureInformationCapabilities { * property. The order describes the preferred format of the client. *

* See {@link MarkupKind} for allowed values. + *

+ * Since 3.3.0 */ List documentationFormat /** * Client capabilities specific to parameter information. + *

+ * Since 3.14.0 */ ParameterInformationCapabilities parameterInformation @@ -696,14 +781,14 @@ class SignatureInformationCapabilities { /** * Client capabilities specific to parameter information. + *

+ * Since 3.14.0 */ @JsonRpcData class ParameterInformationCapabilities { /** * The client supports processing label offsets instead of a * simple label string. - *

- * Since 3.14.0 */ Boolean labelOffsetSupport @@ -776,6 +861,8 @@ class DocumentHighlightCapabilities extends DynamicRegistrationCapabilities { /** * Specific capabilities for the {@link SymbolKind}. + *

+ * Since 3.4.0 */ @JsonRpcData class SymbolKindCapabilities { @@ -828,11 +915,15 @@ class SymbolTagSupportCapabilities { class DocumentSymbolCapabilities extends DynamicRegistrationCapabilities { /** * Specific capabilities for the {@link SymbolKind}. + *

+ * Since 3.4.0 */ SymbolKindCapabilities symbolKind /** * The client support hierarchical document symbols. + *

+ * Since 3.10.0 */ Boolean hierarchicalDocumentSymbolSupport @@ -1654,12 +1745,16 @@ class SemanticTokensCapabilities extends DynamicRegistrationCapabilities { /** * The token types that the client supports. + *

+ * See {@link SemanticTokenTypes} for allowed values. */ @NonNull List tokenTypes /** * The token modifiers that the client supports. + *

+ * See {@link SemanticTokenModifiers} for allowed values. */ @NonNull List tokenModifiers @@ -2655,6 +2750,8 @@ class CodeActionOptions extends AbstractWorkDoneProgressOptions { *

* The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server * may list out every specific kind they provide. + *

+ * Since 3.11.0 */ List codeActionKinds @@ -2684,6 +2781,8 @@ class CodeActionRegistrationOptions extends AbstractTextDocumentRegistrationAndW *

* The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server * may list out every specific kind they provide. + *

+ * Since 3.11.0 */ List codeActionKinds @@ -2851,6 +2950,8 @@ class CompletionItem { /** * Indicates if this item is deprecated. + *

+ * Since 3.8.0 * * @deprecated Use {@link #tags} instead if supported. */ @@ -2863,6 +2964,8 @@ class CompletionItem { * Note that only one completion item can be selected and that the * tool / client decides which item that is. The rule is that the first * item of those that match best is selected. + *

+ * Since 3.9.0 */ Boolean preselect @@ -2960,6 +3063,8 @@ class CompletionItem { * An optional set of characters that when pressed while this completion is active will accept it first and * then type that character. Note that all commit characters should have {@code length=1} and that superfluous * characters will be ignored. + *

+ * Since 3.2.0 */ List commitCharacters @@ -3436,6 +3541,26 @@ class FileSystemWatcher { } } +final class WatchKind { + /** + * Interested in create events. + */ + public static val Create = 1 + + /** + * Interested in change events + */ + public static val Change = 2 + + /** + * Interested in delete events + */ + public static val Delete = 4 + + private new() { + } +} + /** * A relative pattern is a helper to construct glob patterns that are matched * relatively to a base URI. The common value for a {@link #baseUri} is a workspace @@ -3681,6 +3806,8 @@ class DocumentLink { /** * A data entry field that is preserved on a document link between a * DocumentLinkRequest and a DocumentLinkResolveRequest. + *

+ * Since 3.8.0 */ @JsonAdapter(JsonElementTypeAdapter.Factory) Object data @@ -3807,6 +3934,8 @@ class RenameOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressO * Document color options. *

* Referred to as {@code DocumentColorRegistrationOptions} in the LSP spec. + *

+ * Since 3.6.0 */ @JsonRpcData class ColorProviderOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions { @@ -3827,9 +3956,9 @@ class ColorProviderOptions extends AbstractTextDocumentRegistrationAndWorkDonePr /** * Folding range options. *

- * Since 3.10.0 - *

* Referred to as {@code FoldingRangeRegistrationOptions} in the LSP spec. + *

+ * Since 3.10.0 */ @JsonRpcData class FoldingRangeProviderOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions { @@ -4327,7 +4456,30 @@ class FormattingOptions extends LinkedHashMap + * Please note that {@code MarkupKind}s must not start with a {@code $}. These kinds + * are reserved for internal usage. + *

+ * Since 3.3.0 + */ +final class MarkupKind { + /** + * Plain text is supported as a content format. + */ + public static val PLAINTEXT = 'plaintext' + + /** + * Markdown is supported as a content format. + */ + public static val MARKDOWN = 'markdown' + + private new() { + } } /** @@ -4340,11 +4492,15 @@ class FormattingOptions extends LinkedHashMap * Please Note that clients might sanitize the return markdown. A client could decide to * remove HTML from the markdown to avoid script execution. + *

+ * Since 3.3.0 */ @JsonRpcData class MarkupContent { /** * The type of the Markup. + *

+ * See {@link MarkupKind} for allowed values. */ @NonNull String kind @@ -4988,6 +5144,8 @@ class Location { /** * Represents a link between a source and a target location. + *

+ * Since 3.14.0 */ @JsonRpcData class LocationLink { @@ -5119,6 +5277,22 @@ class LogTraceParams { } } +/** + * A TraceValue represents the level of verbosity with which the server systematically reports its execution + * trace using {@code $/logTrace} notifications. The initial trace value is set by the client at initialization and + * can be modified later using the {@code $/setTrace} notification. + */ +final class TraceValue { + public static val Off = 'off' + + public static val Messages = 'messages' + + public static val Verbose = 'verbose' + + private new() { + } +} + /** * A notification that should be used by the client to modify the trace setting of the server. *

@@ -5321,9 +5495,27 @@ class ReferenceParams extends TextDocumentPositionAndWorkDoneProgressAndPartialR } } +/** + * The prepare rename request is sent from the client to the server to setup and test the validity of a + * rename operation at a given location. + *

+ * Since 3.12.0 + */ +@JsonRpcData +class PrepareRenameParams extends TextDocumentPositionParams { + new() { + } + + new(@NonNull TextDocumentIdentifier textDocument, @NonNull Position position) { + super(textDocument, position) + } +} + /** * One of the result types of the `textDocument/prepareRename` request. * Provides the range of the string to rename and a placeholder text of the string content to be renamed. + *

+ * Since 3.12.0 */ @JsonRpcData class PrepareRenameResult { @@ -5453,6 +5645,100 @@ class LinkedEditingRanges { } } +/** + * Since 3.16.0 + */ +final class SemanticTokenTypes { + public static val Namespace = 'namespace' + + /** + * Represents a generic type. Acts as a fallback for types which + * can't be mapped to a specific type like class or enum. + */ + public static val Type = 'type' + + public static val Class = 'class' + + public static val Enum = 'enum' + + public static val Interface = 'interface' + + public static val Struct = 'struct' + + public static val TypeParameter = 'typeParameter' + + public static val Parameter = 'parameter' + + public static val Variable = 'variable' + + public static val Property = 'property' + + public static val EnumMember = 'enumMember' + + public static val Event = 'event' + + public static val Function = 'function' + + public static val Method = 'method' + + public static val Macro = 'macro' + + public static val Keyword = 'keyword' + + public static val Modifier = 'modifier' + + public static val Comment = 'comment' + + public static val String = 'string' + + public static val Number = 'number' + + public static val Regexp = 'regexp' + + public static val Operator = 'operator' + + private new() { + } +} + +/** + * Since 3.16.0 + */ +final class SemanticTokenModifiers { + public static val Declaration = 'declaration' + + public static val Definition = 'definition' + + public static val Readonly = 'readonly' + + public static val Static = 'static' + + public static val Deprecated = 'deprecated' + + public static val Abstract = 'abstract' + + public static val Async = 'async' + + public static val Modification = 'modification' + + public static val Documentation = 'documentation' + + public static val DefaultLibrary = 'defaultLibrary' + + private new() { + } +} + +/** + * Since 3.16.0 + */ +final class TokenFormat { + public static val Relative = 'relative' + + private new() { + } +} + /** * The legend used by the server *

@@ -5462,12 +5748,16 @@ class LinkedEditingRanges { class SemanticTokensLegend { /** * The token types that the client supports. + *

+ * See {@link SemanticTokenTypes} for allowed values. */ @NonNull List tokenTypes /** * The token modifiers that the client supports. + *

+ * See {@link SemanticTokenModifiers} for allowed values. */ @NonNull List tokenModifiers @@ -5479,7 +5769,6 @@ class SemanticTokensLegend { this.tokenTypes = Preconditions.checkNotNull(tokenTypes, 'tokenTypes') this.tokenModifiers = Preconditions.checkNotNull(tokenModifiers, 'tokenModifiers') } - } /** @@ -5507,7 +5796,6 @@ class SemanticTokensServerFull { */ @JsonRpcData class SemanticTokensWithRegistrationOptions extends AbstractWorkDoneProgressOptions { - /** * The legend used by the server */ @@ -5572,7 +5860,6 @@ class SemanticTokensWithRegistrationOptions extends AbstractWorkDoneProgressOpti this.range = range this.documentSelector = documentSelector } - } /** @@ -6324,6 +6611,8 @@ class TypeHierarchyItem { * Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be * hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, * e.g. the range of an identifier. + *

+ * Since 3.10.0 */ @JsonRpcData class DocumentSymbol { @@ -6434,6 +6723,8 @@ class SymbolInformation { /** * Indicates if this symbol is deprecated. + *

+ * Since 3.8.0 * * @deprecated Use {@link #tags} instead if supported. */ @@ -6709,6 +7000,8 @@ class CompletionParams extends TextDocumentPositionAndWorkDoneProgressAndPartial /** * The completion context. This is only available if the client specifies * to send this using {@link CompletionCapabilities#contextSupport} as true. + *

+ * Since 3.3.0 */ CompletionContext context @@ -6725,6 +7018,9 @@ class CompletionParams extends TextDocumentPositionAndWorkDoneProgressAndPartial } } +/** + * Since 3.3.0 + */ @JsonRpcData class CompletionContext { /** @@ -6952,6 +7248,8 @@ abstract class ResourceOperation { /** * Options to create a file. + *

+ * Since 3.13.0 */ @JsonRpcData class CreateFileOptions { @@ -6976,6 +7274,8 @@ class CreateFileOptions { /** * Create file operation + *

+ * Since 3.13.0 */ @JsonRpcData class CreateFile extends ResourceOperation { @@ -7007,6 +7307,8 @@ class CreateFile extends ResourceOperation { /** * Rename file options + *

+ * Since 3.13.0 */ @JsonRpcData class RenameFileOptions { @@ -7031,6 +7333,8 @@ class RenameFileOptions { /** * Rename file operation + *

+ * Since 3.13.0 */ @JsonRpcData class RenameFile extends ResourceOperation { @@ -7069,6 +7373,8 @@ class RenameFile extends ResourceOperation { /** * Delete file options + *

+ * Since 3.13.0 */ @JsonRpcData class DeleteFileOptions { @@ -7093,6 +7399,8 @@ class DeleteFileOptions { /** * Delete file operation + *

+ * Since 3.13.0 */ @JsonRpcData class DeleteFile extends ResourceOperation { @@ -7388,8 +7696,7 @@ class UnregistrationParams { @JsonRpcData class TextDocumentChangeRegistrationOptions extends TextDocumentRegistrationOptions { /** - * How documents are synced to the server. See TextDocumentSyncKind.Full - * and TextDocumentSyncKind.Incremental. + * How documents are synced to the server. */ @NonNull TextDocumentSyncKind syncKind @@ -7694,6 +8001,8 @@ class WorkspaceFoldersOptions { * the current open list of workspace folders. Returns null in the response if only a single * file is open in the tool. Returns an empty array if a workspace is open but no folders * are configured. + *

+ * Since 3.6.0 */ @JsonRpcData class WorkspaceFolder { @@ -7911,6 +8220,27 @@ class FileOperationPattern { } } +/** + * A pattern kind describing if a glob pattern matches a file a folder or + * both. + *

+ * Since 3.16.0 + */ +final class FileOperationPatternKind { + /** + * The pattern matches a file only. + */ + public static val File = 'file' + + /** + * The pattern matches a folder only. + */ + public static val Folder = 'folder' + + private new() { + } +} + /** * Matching options for the file operation pattern. *

@@ -8138,6 +8468,9 @@ class DocumentColorParams extends WorkDoneProgressAndPartialResultParams { } } +/** + * Since 3.6.0 + */ @JsonRpcData class ColorInformation { /** @@ -8163,6 +8496,8 @@ class ColorInformation { /** * Represents a color in RGBA space. + *

+ * Since 3.6.0 */ @JsonRpcData class Color { @@ -8233,6 +8568,9 @@ class ColorPresentationParams extends WorkDoneProgressAndPartialResultParams { } } +/** + * Since 3.6.0 + */ @JsonRpcData class ColorPresentation { /** @@ -8666,10 +9004,16 @@ class HoverParams extends TextDocumentPositionAndWorkDoneProgressParams { } } +/** + * Since 3.14.0 + */ @JsonRpcData class DeclarationOptions extends AbstractWorkDoneProgressOptions { } +/** + * Since 3.14.0 + */ @JsonRpcData class DeclarationRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions { /** @@ -8689,6 +9033,8 @@ class DeclarationRegistrationOptions extends AbstractTextDocumentRegistrationAnd /** * The go to declaration request is sent from the client to the server to resolve the declaration * location of a symbol at a given text document position. + *

+ * Since 3.14.0 */ @JsonRpcData class DeclarationParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams { @@ -8722,10 +9068,16 @@ class DefinitionParams extends TextDocumentPositionAndWorkDoneProgressAndPartial } } +/** + * Since 3.6.0 + */ @JsonRpcData class TypeDefinitionOptions extends AbstractWorkDoneProgressOptions { } +/** + * Since 3.6.0 + */ @JsonRpcData class TypeDefinitionRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions { /** @@ -8745,6 +9097,8 @@ class TypeDefinitionRegistrationOptions extends AbstractTextDocumentRegistration /** * The go to type definition request is sent from the client to the server to resolve the type definition * location of a symbol at a given text document position. + *

+ * Since 3.6.0 */ @JsonRpcData class TypeDefinitionParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams { @@ -8756,10 +9110,16 @@ class TypeDefinitionParams extends TextDocumentPositionAndWorkDoneProgressAndPar } } +/** + * Since 3.6.0 + */ @JsonRpcData class ImplementationOptions extends AbstractWorkDoneProgressOptions { } +/** + * Since 3.6.0 + */ @JsonRpcData class ImplementationRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions { /** @@ -8779,6 +9139,8 @@ class ImplementationRegistrationOptions extends AbstractTextDocumentRegistration /** * The go to implementation request is sent from the client to the server to resolve the implementation * location of a symbol at a given text document position. + *

+ * Since 3.6.0 */ @JsonRpcData class ImplementationParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams { @@ -8812,20 +9174,6 @@ class DocumentHighlightParams extends TextDocumentPositionAndWorkDoneProgressAnd } } -/** - * The prepare rename request is sent from the client to the server to setup and test the validity of a - * rename operation at a given location. - */ -@JsonRpcData -class PrepareRenameParams extends TextDocumentPositionParams { - new() { - } - - new(@NonNull TextDocumentIdentifier textDocument, @NonNull Position position) { - super(textDocument, position) - } -} - /** * Moniker options. *

@@ -8859,6 +9207,67 @@ class MonikerParams extends TextDocumentPositionAndWorkDoneProgressAndPartialRes } } +/** + * Moniker uniqueness level to define scope of the moniker. + *

+ * Since 3.16.0 + */ +final class UniquenessLevel { + /** + * The moniker is only unique inside a document + */ + public static val Document = 'document' + + /** + * The moniker is unique inside a project for which a dump got created + */ + public static val Project = 'project' + + /** + * The moniker is unique inside the group to which a project belongs + */ + public static val Group = 'group' + + /** + * The moniker is unique inside the moniker scheme. + */ + public static val Scheme = 'scheme' + + /** + * The moniker is globally unique + */ + public static val Global = 'global' + + private new() { + } +} + +/** + * The moniker kind. + *

+ * Since 3.16.0 + */ +final class MonikerKind { + /** + * The moniker represents a symbol that is imported into a project + */ + public static val Import = 'import' + + /** + * The moniker represents a symbol that is exported from a project + */ + public static val Export = 'export' + + /** + * The moniker represents a symbol that is local to a project (e.g. a local + * variable of a function, a class not visible outside the project, ...) + */ + public static val Local = 'local' + + private new() { + } +} + /** * Moniker definition to match LSIF 0.5 moniker definition. *

diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResourceOperationKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResourceOperationKind.java deleted file mode 100644 index 7de57ed8..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResourceOperationKind.java +++ /dev/null @@ -1,37 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2018 Microsoft Corporation and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ - -package org.eclipse.lsp4j; - -/** - * The kind of resource operations supported by the client. - */ -public final class ResourceOperationKind { - - private ResourceOperationKind() { - } - - /** - * Supports creating new files and folders. - */ - public static final String Create = "create"; - - /** - * Supports renaming existing files and folders. - */ - public static final String Rename = "rename"; - - /** - * Supports deleting existing files and folders. - */ - public static final String Delete = "delete"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResponseErrorCode.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResponseErrorCode.java deleted file mode 100644 index 047fd1ea..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/ResponseErrorCode.java +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2016 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ -package org.eclipse.lsp4j; - -/** - * A number indicating the error type that occured. - * - * @deprecated Use {@link org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode} instead - */ -@Deprecated -public enum ResponseErrorCode { - - ParseError(-32700), - - InvalidRequest(-32600), - - MethodNotFound(-32601), - - InvalidParams(-32602), - - InternalError(-32603), - - serverErrorStart(-32099), - - serverErrorEnd(-32000); - - private final int value; - - ResponseErrorCode(int value) { - this.value = value; - } - - public int getValue() { - return value; - } - -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenModifiers.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenModifiers.java deleted file mode 100644 index a920c550..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenModifiers.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) 2020 Eric Dallo. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ -package org.eclipse.lsp4j; - -/** - * Since 3.16.0 - */ -public final class SemanticTokenModifiers { - private SemanticTokenModifiers() { - } - - public static final String Declaration = "declaration"; - - public static final String Definition = "definition"; - - public static final String Readonly = "readonly"; - - public static final String Static = "static"; - - public static final String Deprecated = "deprecated"; - - public static final String Abstract = "abstract"; - - public static final String Async = "async"; - - public static final String Modification = "modification"; - - public static final String Documentation = "documentation"; - - public static final String DefaultLibrary = "defaultLibrary"; - -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenTypes.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenTypes.java deleted file mode 100644 index 5abf16ab..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SemanticTokenTypes.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) 2020 Eric Dallo. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ -package org.eclipse.lsp4j; - -/** - * Since 3.16.0 - */ -public final class SemanticTokenTypes { - private SemanticTokenTypes() { - } - - public static final String Namespace = "namespace"; - - /** - * Represents a generic type. Acts as a fallback for types which - * can't be mapped to a specific type like class or enum. - */ - public static final String Type = "type"; - - public static final String Class = "class"; - - public static final String Enum = "enum"; - - public static final String Interface = "interface"; - - public static final String Struct = "struct"; - - public static final String TypeParameter = "typeParameter"; - - public static final String Parameter = "parameter"; - - public static final String Variable = "variable"; - - public static final String Property = "property"; - - public static final String EnumMember = "enumMember"; - - public static final String Event = "event"; - - public static final String Function = "function"; - - /** - * @deprecated This was erroneously named prior to finalization. Use {@link #Method} instead. - */ - @Deprecated - public static final String Member = "member"; - - public static final String Method = "method"; - - public static final String Macro = "macro"; - - public static final String Keyword = "keyword"; - - public static final String Modifier = "modifier"; - - public static final String Comment = "comment"; - - public static final String String = "string"; - - public static final String Number = "number"; - - public static final String Regexp = "regexp"; - - public static final String Operator = "operator"; - -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SignatureHelpTriggerKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SignatureHelpTriggerKind.java index d036189c..f843f00e 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SignatureHelpTriggerKind.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SignatureHelpTriggerKind.java @@ -13,7 +13,7 @@ /** * How a signature help was triggered. - * + *

* Since 3.15.0 */ public enum SignatureHelpTriggerKind { diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java index 9a87c556..ef2012ef 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/SymbolTag.java @@ -14,7 +14,7 @@ /** * Symbol tags are extra annotations that tweak the rendering of a symbol. - * + *

* Since 3.16 */ public enum SymbolTag { diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TextDocumentSaveReason.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TextDocumentSaveReason.java index 7cfef6af..c6cae95c 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TextDocumentSaveReason.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TextDocumentSaveReason.java @@ -18,7 +18,7 @@ public enum TextDocumentSaveReason { /** * Manually triggered, e.g. by the user pressing save, by starting debugging, - * or by an API call. + * or by an API call. */ Manual(1), diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TokenFormat.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TokenFormat.java deleted file mode 100644 index c576b4e2..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TokenFormat.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (c) 2020 Eric Dallo. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ -package org.eclipse.lsp4j; - -/** - * Since 3.16.0 - */ -public final class TokenFormat { - private TokenFormat() { - } - - public static final String Relative = "relative"; - -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TraceValue.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TraceValue.java deleted file mode 100644 index c5c7c824..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/TraceValue.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Copyright (c) 2020 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ - -package org.eclipse.lsp4j; - -/** - * A TraceValue represents the level of verbosity with which the server systematically reports its execution - * trace using {@code $/logTrace} notifications. The initial trace value is set by the client at initialization and - * can be modified later using the {@code $/setTrace} notification. - */ -public class TraceValue { - private TraceValue() { - } - - public static final String Off = "off"; - - /** - * @deprecated Use {@link #Messages} instead. This was a typo in the spec. - */ - @Deprecated - public static final String Message = "message"; - - public static final String Messages = "messages"; - - public static final String Verbose = "verbose"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/UniquenessLevel.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/UniquenessLevel.java deleted file mode 100644 index dfb258e0..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/UniquenessLevel.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) 2020 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - */ - -package org.eclipse.lsp4j; - -/** - * Moniker uniqueness level to define scope of the moniker. - * - * Since 3.16.0 - */ -public final class UniquenessLevel { - private UniquenessLevel() { - } - - /** - * The moniker is only unique inside a document - */ - public static final String Document = "document"; - - /** - * The moniker is unique inside a project for which a dump got created - */ - public static final String Project = "project"; - - /** - * The moniker is unique inside the group to which a project belongs - */ - public static final String Group = "group"; - - /** - * The moniker is unique inside the moniker scheme. - */ - public static final String Scheme = "scheme"; - - /** - * The moniker is globally unique - */ - public static final String Global = "global"; -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/WatchKind.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/WatchKind.java deleted file mode 100644 index 46b51cff..00000000 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/WatchKind.java +++ /dev/null @@ -1,32 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2018 TypeFox and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, - * or the Eclipse Distribution License v. 1.0 which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause - ******************************************************************************/ -package org.eclipse.lsp4j; - -public final class WatchKind { - private WatchKind() {} - - /** - * Interested in create events. - */ - public static final int Create = 1; - - /** - * Interested in change events - */ - public static final int Change = 2; - - /** - * Interested in delete events - */ - public static final int Delete = 4; - -} diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/LanguageServer.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/LanguageServer.java index ec4e4e7c..db789475 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/LanguageServer.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/LanguageServer.java @@ -30,17 +30,19 @@ public interface LanguageServer { /** * The initialize request is sent as the first request from the client to * the server. - * + *

* If the server receives requests or notifications before the initialize request, it should act as follows: - * - for a request, the response should be errored with: - * {@link org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode#serverNotInitialized}. + *

    + *
  • for a request, the response should be errored with: + * {@link org.eclipse.lsp4j.jsonrpc.messages.ResponseErrorCode#ServerNotInitialized}. * The message can be picked by the server. - * - notifications should be dropped, except for the exit notification. + *
  • notifications should be dropped, except for the exit notification. * This will allow the client to exit a server without an initialize request. - * + *
+ *

* Until the server has responded to the initialize request with an InitializeResult, * the client must not send any additional requests or notifications to the server. - * + *

* During the initialize request, the server is allowed to send the notifications window/showMessage, * window/logMessage, and telemetry/event, as well as the request window/showMessageRequest, to the client. */ diff --git a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/TextDocumentService.java b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/TextDocumentService.java index 9e13d68a..e39e76b7 100644 --- a/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/TextDocumentService.java +++ b/org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/services/TextDocumentService.java @@ -112,8 +112,8 @@ public interface TextDocumentService { * completion items is expensive servers can additional provide a handler * for the resolve completion item request. This request is sent when a * completion item is selected in the user interface. - * - * Registration Options: CompletionRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.CompletionRegistrationOptions} */ @JsonRequest default CompletableFuture, CompletionList>> completion(CompletionParams position) { @@ -132,8 +132,8 @@ default CompletableFuture resolveCompletionItem(CompletionItem u /** * The hover request is sent from the client to the server to request hover * information at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.HoverRegistrationOptions} */ @JsonRequest default CompletableFuture hover(HoverParams params) { @@ -143,8 +143,8 @@ default CompletableFuture hover(HoverParams params) { /** * The signature help request is sent from the client to the server to * request signature information at a given cursor position. - * - * Registration Options: SignatureHelpRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.SignatureHelpRegistrationOptions} */ @JsonRequest default CompletableFuture signatureHelp(SignatureHelpParams params) { @@ -154,9 +154,9 @@ default CompletableFuture signatureHelp(SignatureHelpParams param /** * The go to declaration request is sent from the client to the server to resolve * the declaration location of a symbol at a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions - * + *

+ * Registration Options: {@link org.eclipse.lsp4j.DeclarationRegistrationOptions} + *

* Since 3.14.0 */ @JsonRequest @@ -168,8 +168,8 @@ default CompletableFuture, List + * Registration Options: {@link org.eclipse.lsp4j.DefinitionRegistrationOptions} */ @JsonRequest @ResponseJsonAdapter(LocationLinkListAdapter.class) @@ -180,9 +180,9 @@ default CompletableFuture, List + * Registration Options: {@link org.eclipse.lsp4j.TypeDefinitionRegistrationOptions} + *

* Since 3.6.0 */ @JsonRequest @@ -194,9 +194,9 @@ default CompletableFuture, List + * Registration Options: {@link org.eclipse.lsp4j.ImplementationRegistrationOptions} + *

* Since 3.6.0 */ @JsonRequest @@ -209,8 +209,8 @@ default CompletableFuture, List + * Registration Options: {@link org.eclipse.lsp4j.ReferenceRegistrationOptions} */ @JsonRequest default CompletableFuture> references(ReferenceParams params) { @@ -220,8 +220,8 @@ default CompletableFuture> references(ReferenceParams p /** * The document highlight request is sent from the client to the server to * to resolve a document highlights for a given text document position. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.DocumentHighlightRegistrationOptions} */ @JsonRequest default CompletableFuture> documentHighlight(DocumentHighlightParams params) { @@ -231,9 +231,8 @@ default CompletableFuture> documentHighlight(D /** * The document symbol request is sent from the client to the server to list all * symbols found in a given text document. - * + *

* Registration Options: {@link TextDocumentRegistrationOptions} - * *

* Caveat: although the return type allows mixing the * {@link DocumentSymbol} and {@link SymbolInformation} instances into a list do @@ -244,8 +243,7 @@ default CompletableFuture> documentHighlight(D * {@code true}. More details on this difference between the LSP and the LSP4J * can be found here. *

- * - * Servers should whenever possible return {@code DocumentSymbol} since it is the richer data structure. + * Servers should whenever possible return {@link DocumentSymbol} since it is the richer data structure. */ @JsonRequest @ResponseJsonAdapter(DocumentSymbolResponseAdapter.class) @@ -257,8 +255,8 @@ default CompletableFuture>> docum * The code action request is sent from the client to the server to compute * commands for a given text document and range. These commands are * typically code fixes to either fix problems or to beautify/refactor code. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.CodeActionRegistrationOptions} */ @JsonRequest @ResponseJsonAdapter(CodeActionResponseAdapter.class) @@ -269,7 +267,7 @@ default CompletableFuture>> codeAction(CodeActi /** * The request is sent from the client to the server to resolve additional information for a given code action. This is usually used to compute * the `edit` property of a code action to avoid its unnecessary computation during the `textDocument/codeAction` request. - * + *

* Since 3.16.0 */ @JsonRequest(value="codeAction/resolve", useSegment = false) @@ -280,8 +278,8 @@ default CompletableFuture resolveCodeAction(CodeAction unresolved) { /** * The code lens request is sent from the client to the server to compute * code lenses for a given text document. - * - * Registration Options: CodeLensRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.CodeLensRegistrationOptions} */ @JsonRequest default CompletableFuture> codeLens(CodeLensParams params) { @@ -300,8 +298,8 @@ default CompletableFuture resolveCodeLens(CodeLens unresolved) { /** * The document formatting request is sent from the client to the server to * format a whole document. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.DocumentFormattingRegistrationOptions} */ @JsonRequest default CompletableFuture> formatting(DocumentFormattingParams params) { @@ -311,8 +309,8 @@ default CompletableFuture> formatting(DocumentFormattin /** * The document range formatting request is sent from the client to the * server to format a given range in a document. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.DocumentRangeFormattingRegistrationOptions} */ @JsonRequest default CompletableFuture> rangeFormatting(DocumentRangeFormattingParams params) { @@ -322,8 +320,8 @@ default CompletableFuture> rangeFormatting(DocumentRang /** * The document on type formatting request is sent from the client to the * server to format parts of the document during typing. - * - * Registration Options: DocumentOnTypeFormattingRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.DocumentOnTypeFormattingRegistrationOptions} */ @JsonRequest default CompletableFuture> onTypeFormatting(DocumentOnTypeFormattingParams params) { @@ -333,8 +331,8 @@ default CompletableFuture> onTypeFormatting(DocumentOnT /** * The rename request is sent from the client to the server to do a * workspace wide rename of a symbol. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.RenameOptions RenameRegistrationOptions} */ @JsonRequest default CompletableFuture rename(RenameParams params) { @@ -349,9 +347,9 @@ default CompletableFuture rename(RenameParams params) { * applied to all other ranges if the new content is valid. If no result-specific * word pattern is provided, the word pattern from the client's language configuration * is used. - * - * Registration Options: LinkedEditingRangeRegistrationOptions - * + *

+ * Registration Options: {@link org.eclipse.lsp4j.LinkedEditingRangeRegistrationOptions} + *

* Since 3.16.0 */ @JsonRequest @@ -364,8 +362,8 @@ default CompletableFuture linkedEditingRange(LinkedEditingR * signal newly opened text documents. The document's truth is now managed * by the client and the server must not try to read the document's truth * using the document's uri. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentRegistrationOptions} */ @JsonNotification void didOpen(DidOpenTextDocumentParams params); @@ -373,8 +371,8 @@ default CompletableFuture linkedEditingRange(LinkedEditingR /** * The document change notification is sent from the client to the server to * signal changes to a text document. - * - * Registration Options: TextDocumentChangeRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentChangeRegistrationOptions} */ @JsonNotification void didChange(DidChangeTextDocumentParams params); @@ -384,8 +382,8 @@ default CompletableFuture linkedEditingRange(LinkedEditingR * when the document got closed in the client. The document's truth now * exists where the document's uri points to (e.g. if the document's uri is * a file uri the truth now exists on disk). - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentRegistrationOptions} */ @JsonNotification void didClose(DidCloseTextDocumentParams params); @@ -393,16 +391,16 @@ default CompletableFuture linkedEditingRange(LinkedEditingR /** * The document save notification is sent from the client to the server when * the document for saved in the client. - * - * Registration Options: TextDocumentSaveRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentSaveRegistrationOptions} */ @JsonNotification void didSave(DidSaveTextDocumentParams params); /** * The document will save notification is sent from the client to the server before the document is actually saved. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentRegistrationOptions} */ @JsonNotification default void willSave(WillSaveTextDocumentParams params) {} @@ -412,8 +410,8 @@ default void willSave(WillSaveTextDocumentParams params) {} * The request can return an array of TextEdits which will be applied to the text document before it is saved. * Please note that clients might drop results if computing the text edits took too long or if a server constantly fails on this request. * This is done to keep the save fast and reliable. - * - * Registration Options: TextDocumentRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.TextDocumentRegistrationOptions} */ @JsonRequest default CompletableFuture> willSaveWaitUntil(WillSaveTextDocumentParams params) { @@ -422,8 +420,8 @@ default CompletableFuture> willSaveWaitUntil(WillSaveTextDocument /** * The document links request is sent from the client to the server to request the location of links in a document. - * - * Registration Options: DocumentLinkRegistrationOptions + *

+ * Registration Options: {@link org.eclipse.lsp4j.DocumentLinkRegistrationOptions} */ @JsonRequest default CompletableFuture> documentLink(DocumentLinkParams params) { @@ -441,11 +439,13 @@ default CompletableFuture documentLinkResolve(DocumentLink params) /** * The document color request is sent from the client to the server to list all color references found in a given text * document. Along with the range, a color value in RGB is returned. - * + *

* Clients can use the result to decorate color references in an editor. For example: - * - Color boxes showing the actual color next to the reference - * - Show a color picker when a color reference is edited - * + *

    + *
  • Color boxes showing the actual color next to the reference + *
  • Show a color picker when a color reference is edited + *
+ *

* Since 3.6.0 */ @JsonRequest @@ -456,9 +456,11 @@ default CompletableFuture> documentColor(DocumentColorPar /** * The color presentation request is sent from the client to the server to obtain a list of presentations for a color * value at a given location. Clients can use the result to - * - modify a color reference. - * - show in a color picker and let users pick one of the presentations - * + *

    + *
  • modify a color reference. + *
  • show in a color picker and let users pick one of the presentations + *
+ *

* Since 3.6.0 */ @JsonRequest @@ -469,7 +471,7 @@ default CompletableFuture> colorPresentation(ColorPresen /** * The folding range request is sent from the client to the server to return all folding * ranges found in a given text document. - * + *

* Since 3.10.0 */ @JsonRequest @@ -480,7 +482,7 @@ default CompletableFuture> foldingRange(FoldingRangeRequestPa /** * The prepare rename request is sent from the client to the server to setup and test the validity of a rename * operation at a given location. - * + *

* Since 3.12.0 */ @JsonRequest @@ -493,8 +495,10 @@ default CompletableFuture> prepareRename(Prep * The type hierarchy request is sent from the client to the server to return a type hierarchy for * the language element of given text document positions. Will return {@code null} if the server * couldn't infer a valid type from the position. The type hierarchy requests are executed in two steps: - * 1. first a type hierarchy item is prepared for the given text document position. - * 2. for a type hierarchy item the supertype or subtype type hierarchy items are resolved. + *

    + *
  1. first a type hierarchy item is prepared for the given text document position. + *
  2. for a type hierarchy item the supertype or subtype type hierarchy items are resolved. + *
*

* Since 3.17.0 */ @@ -538,7 +542,7 @@ default CompletableFuture> typeHierarchySubtypes(TypeHie * Bootstraps call hierarchy by returning the item that is denoted by the given document * and position. This item will be used as entry into the call graph. Providers should * return null when there is no item at the given location. - * + *

* Since 3.16.0 */ @JsonRequest @@ -550,7 +554,7 @@ default CompletableFuture> prepareCallHierarchy(CallHier * Provide all incoming calls for an item, e.g all callers for a method. In graph terms this describes directed * and annotated edges inside the call graph, e.g the given item is the starting node and the result is the nodes * that can be reached. - * + *

* Since 3.16.0 */ @JsonRequest(value="callHierarchy/incomingCalls", useSegment = false) @@ -562,7 +566,7 @@ default CompletableFuture> callHierarchyIncoming * Provide all outgoing calls for an item, e.g call calls to functions, methods, or constructors from the given item. In * graph terms this describes directed and annotated edges inside the call graph, e.g the given item is the starting * node and the result is the nodes that can be reached. - * + *

* Since 3.16.0 */ @JsonRequest(value="callHierarchy/outgoingCalls", useSegment = false) @@ -574,7 +578,7 @@ default CompletableFuture> callHierarchyOutgoing * The {@code textDocument/selectionRange} request is sent from the client to the server to return * suggested selection ranges at an array of given positions. A selection range is a range around * the cursor position which the user might be interested in selecting. - * + *

* Since 3.15.0 */ @JsonRequest @@ -585,7 +589,7 @@ default CompletableFuture> selectionRange(SelectionRangePar /** * The {@code textDocument/semanticTokens/full} request is sent from the client to the server to return * the semantic tokens for a whole file. - * + *

* Since 3.16.0 */ @JsonRequest(value="textDocument/semanticTokens/full", useSegment = false) @@ -596,7 +600,7 @@ default CompletableFuture semanticTokensFull(SemanticTokensParam /** * The {@code textDocument/semanticTokens/full/delta} request is sent from the client to the server to return * the semantic tokens delta for a whole file. - * + *

* Since 3.16.0 */ @JsonRequest(value="textDocument/semanticTokens/full/delta", useSegment = false) @@ -608,14 +612,14 @@ default CompletableFuture> semanticT /** * The {@code textDocument/semanticTokens/range} request is sent from the client to the server to return * the semantic tokens delta for a range. - * + *

* When a user opens a file it can be beneficial to only compute the semantic tokens for the visible range * (faster rendering of the tokens in the user interface). If a server can compute these tokens faster than * for the whole file it can provide a handler for the textDocument/semanticTokens/range request to handle * this case special. Please note that if a client also announces that it will send the * textDocument/semanticTokens/range server should implement this request as well to allow for flicker free * scrolling and semantic coloring of a minimap. - * + *

* Since 3.16.0 */ @JsonRequest(value="textDocument/semanticTokens/range", useSegment = false) @@ -629,11 +633,11 @@ default CompletableFuture semanticTokensRange(SemanticTokensRang * information given a text document position. Clients can utilize this method to get the moniker at the current * location in a file user is editing and do further code navigation queries in other services that rely on LSIF indexes * and link symbols together. - * + *

* The {@code textDocument/moniker} request is sent from the client to the server to get the symbol monikers for a given * text document position. An array of Moniker types is returned as response to indicate possible monikers at the given location. * If no monikers can be calculated, an empty array or null should be returned. - * + *

* Since 3.16.0 */ @JsonRequest