Skip to content

Commit

Permalink
Merge pull request eclipse-lsp4j#482 from KamasamaK/remove-semantic-h…
Browse files Browse the repository at this point in the history
…ighlighting

Remove Semantic Highlighting API
  • Loading branch information
KamasamaK authored Jan 18, 2021
2 parents d39934a + 45627ff commit 5b8a825
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 1,057 deletions.
138 changes: 0 additions & 138 deletions org.eclipse.lsp4j/src/main/java/org/eclipse/lsp4j/Protocol.xtend
Original file line number Diff line number Diff line change
Expand Up @@ -1310,34 +1310,6 @@ class FoldingRangeCapabilities extends DynamicRegistrationCapabilities {
Boolean lineFoldingOnly
}

/**
* Capabilities specific to {@code textDocument/semanticHighlighting}.
*
* <p>
* <b>Note:</b> the <a href=
* "https://github.com/Microsoft/vscode-languageserver-node/pull/367">{@code textDocument/semanticHighlighting}
* language feature</a> is not yet part of the official LSP specification.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
@JsonRpcData
class SemanticHighlightingCapabilities {

/**
* The client supports semantic highlighting.
*/
Boolean semanticHighlighting

new() {
}

new(Boolean semanticHighlighting) {
this.semanticHighlighting = semanticHighlighting
}
}

/**
* Capabilities specific to the {@code textDocument/typeHierarchy}.
*
Expand Down Expand Up @@ -1845,15 +1817,6 @@ class TextDocumentClientCapabilities {
*/
FoldingRangeCapabilities foldingRange

/**
* Capabilities specific to {@code textDocument/semanticHighlighting}.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
SemanticHighlightingCapabilities semanticHighlightingCapabilities

/**
* Capabilities specific to {@code textDocument/typeHierarchy}.
*/
Expand Down Expand Up @@ -4977,15 +4940,6 @@ class ServerCapabilities {
*/
WorkspaceServerCapabilities workspace

/**
* Semantic highlighting server capabilities.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
SemanticHighlightingServerCapabilities semanticHighlighting

/**
* Server capability for calculating super- and subtype hierarchies.
* The LS supports the type hierarchy language feature, if this capability is set to {@code true}.
Expand Down Expand Up @@ -5068,38 +5022,6 @@ class WorkspaceServerCapabilities {
}
}

/**
* Semantic highlighting server capabilities.
*
* <p>
* <b>Note:</b> the <a href=
* "https://github.com/Microsoft/vscode-languageserver-node/pull/367">{@code textDocument/semanticHighlighting}
* language feature</a> is not yet part of the official LSP specification.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
@JsonRpcData
class SemanticHighlightingServerCapabilities {

/**
* A "lookup table" of semantic highlighting <a href="https://manual.macromates.com/en/language_grammars">TextMate scopes</a>
* supported by the language server. If not defined or empty, then the server does not support the semantic highlighting
* feature. Otherwise, clients should reuse this "lookup table" when receiving semantic highlighting notifications from
* the server.
*/
List<List<String>> scopes

new() {
}

new(List<List<String>> scopes) {
this.scopes = scopes
}

}

/**
* The show message request is sent from a server to a client to ask the client to display a particular message in the
* user class. In addition to the show message notification the request allows to pass actions and to wait for an
Expand Down Expand Up @@ -7484,66 +7406,6 @@ class FoldingRange {
}
}

/**
* Parameters for the semantic highlighting (server-side) push notification.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
@JsonRpcData
class SemanticHighlightingParams {
/**
* The text document that has to be decorated with the semantic highlighting information.
*/
@NonNull
VersionedTextDocumentIdentifier textDocument

/**
* An array of semantic highlighting information.
*/
@NonNull
List<SemanticHighlightingInformation> lines

new() {
}

new(@NonNull VersionedTextDocumentIdentifier textDocument, @NonNull List<SemanticHighlightingInformation> lines) {
this.textDocument = Preconditions.checkNotNull(textDocument, 'textDocument')
this.lines = Preconditions.checkNotNull(lines, 'lines')
}
}

/**
* Represents a semantic highlighting information that has to be applied on a specific line of the text document.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
@JsonRpcData
class SemanticHighlightingInformation {
/**
* The zero-based line position in the text document.
*/
int line

/**
* A base64 encoded string representing every single highlighted ranges in the line with its start position, length
* and the "lookup table" index of of the semantic highlighting <a href="https://manual.macromates.com/en/language_grammars">
* TextMate scopes</a>. If the {@code tokens} is empty or not defined, then no highlighted positions are available for the line.
*/
String tokens

new() {
}

new(int line, String tokens) {
this.line = line
this.tokens = tokens
}
}

/**
* The parameter of a `textDocument/prepareCallHierarchy` request.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.eclipse.lsp4j.ProgressParams;
import org.eclipse.lsp4j.PublishDiagnosticsParams;
import org.eclipse.lsp4j.RegistrationParams;
import org.eclipse.lsp4j.SemanticHighlightingParams;
import org.eclipse.lsp4j.SetTraceParams;
import org.eclipse.lsp4j.ShowDocumentParams;
import org.eclipse.lsp4j.ShowDocumentResult;
Expand Down Expand Up @@ -142,30 +141,6 @@ default CompletableFuture<List<Object>> configuration(ConfigurationParams config
throw new UnsupportedOperationException();
}

/**
* The {@code textDocument/semanticHighlighting} notification is pushed from the server to the client
* to inform the client about additional semantic highlighting information that has to be applied
* on the text document. It is the server's responsibility to decide which lines are included in
* the highlighting information. In other words, the server is capable of sending only a delta
* information. For instance, after opening the text document ({@code DidOpenTextDocumentNotification})
* the server sends the semantic highlighting information for the entire document, but if the server
* receives a {@code DidChangeTextDocumentNotification}, it pushes the information only about
* the affected lines in the document.
*
* <p>
* <b>Note:</b> the <a href=
* "https://github.com/Microsoft/vscode-languageserver-node/pull/367">{@code textDocument/semanticHighlighting}
* language feature</a> is not yet part of the official LSP specification.
*
* @deprecated Use {@code SemanticTokens} API instead.
*/
@Beta
@Deprecated
@JsonNotification("textDocument/semanticHighlighting")
default void semanticHighlighting(SemanticHighlightingParams params) {
throw new UnsupportedOperationException();
}

/**
* This request is sent from the server to the client to ask the client to create a work done progress.
*
Expand Down
Loading

0 comments on commit 5b8a825

Please sign in to comment.