Class BSLTextDocumentService
- All Implemented Interfaces:
ProtocolExtension
,TextDocumentService
-
Constructor Summary
ConstructorsConstructorDescriptionBSLTextDocumentService
(ServerContext context, LanguageServerConfiguration configuration, DiagnosticProvider diagnosticProvider, CodeActionProvider codeActionProvider, CodeLensProvider codeLensProvider, DocumentLinkProvider documentLinkProvider, DocumentSymbolProvider documentSymbolProvider, FoldingRangeProvider foldingRangeProvider, FormatProvider formatProvider, HoverProvider hoverProvider, ReferencesProvider referencesProvider, DefinitionProvider definitionProvider, CallHierarchyProvider callHierarchyProvider, SelectionRangeProvider selectionRangeProvider, ColorProvider colorProvider, RenameProvider renameProvider, InlayHintProvider inlayHintProvider) -
Method Summary
Modifier and TypeMethodDescriptionProvide all incoming calls for an item, e.g all callers for a method.Provide all outgoing calls for an item, e.g call calls to functions, methods, or constructors from the given item.codeAction
(CodeActionParams params) The code action request is sent from the client to the server to compute commands for a given text document and range.CompletableFuture<List<? extends CodeLens>>
codeLens
(CodeLensParams params) The code lens request is sent from the client to the server to compute code lenses for a given text document.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.CompletableFuture<Either<List<? extends Location>,
List<? extends LocationLink>>> definition
(DefinitionParams params) The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.diagnostics
(DiagnosticParams params) void
didChange
(DidChangeTextDocumentParams params) The document change notification is sent from the client to the server to signal changes to a text document.void
didClose
(DidCloseTextDocumentParams params) The document close notification is sent from the client to the server when the document got closed in the client.void
didOpen
(DidOpenTextDocumentParams params) The document open notification is sent from the client to the server to signal newly opened text documents.void
didSave
(DidSaveTextDocumentParams params) The document save notification is sent from the client to the server when the document for saved in the client.documentColor
(DocumentColorParams params) The document color request is sent from the client to the server to list all color references found in a given text document.documentLink
(DocumentLinkParams params) The document links request is sent from the client to the server to request the location of links in a document.documentSymbol
(DocumentSymbolParams params) The document symbol request is sent from the client to the server to list all symbols found in a given text document.The folding range request is sent from the client to the server to return all folding ranges found in a given text document.CompletableFuture<List<? extends TextEdit>>
formatting
(DocumentFormattingParams params) The document formatting request is sent from the client to the server to format a whole document.hover
(HoverParams params) The hover request is sent from the client to the server to request hover information at a given text document position.inlayHint
(InlayHintParams params) The inlay hints request is sent from the client to the server to compute inlay hints for a given [text document, range] tuple that may be rendered in the editor in place with other text.Bootstraps call hierarchy by returning the item that is denoted by the given document and position.prepareRename
(PrepareRenameParams params) 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.CompletableFuture<List<? extends TextEdit>>
The document range formatting request is sent from the client to the server to format a given range in a document.CompletableFuture<List<? extends Location>>
references
(ReferenceParams params) The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.rename
(RenameParams params) The rename request is sent from the client to the server to do a workspace wide rename of a symbol.void
reset()
resolveCodeLens
(CodeLens unresolved) The code lens resolve request is sent from the client to the server to resolve the command for a given code lens item.selectionRange
(SelectionRangeParams params) ThetextDocument/selectionRange
request is sent from the client to the server to return suggested selection ranges at an array of given positions.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.lsp4j.services.TextDocumentService
completion, declaration, diagnostic, documentHighlight, documentLinkResolve, implementation, inlineValue, linkedEditingRange, moniker, onTypeFormatting, prepareTypeHierarchy, resolveCodeAction, resolveCompletionItem, resolveInlayHint, semanticTokensFull, semanticTokensFullDelta, semanticTokensRange, signatureHelp, typeDefinition, typeHierarchySubtypes, typeHierarchySupertypes, willSave, willSaveWaitUntil
-
Constructor Details
-
BSLTextDocumentService
@ConstructorProperties({"context","configuration","diagnosticProvider","codeActionProvider","codeLensProvider","documentLinkProvider","documentSymbolProvider","foldingRangeProvider","formatProvider","hoverProvider","referencesProvider","definitionProvider","callHierarchyProvider","selectionRangeProvider","colorProvider","renameProvider","inlayHintProvider"}) public BSLTextDocumentService(ServerContext context, LanguageServerConfiguration configuration, DiagnosticProvider diagnosticProvider, CodeActionProvider codeActionProvider, CodeLensProvider codeLensProvider, DocumentLinkProvider documentLinkProvider, DocumentSymbolProvider documentSymbolProvider, FoldingRangeProvider foldingRangeProvider, FormatProvider formatProvider, HoverProvider hoverProvider, ReferencesProvider referencesProvider, DefinitionProvider definitionProvider, CallHierarchyProvider callHierarchyProvider, SelectionRangeProvider selectionRangeProvider, ColorProvider colorProvider, RenameProvider renameProvider, InlayHintProvider inlayHintProvider)
-
-
Method Details
-
hover
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The hover request is sent from the client to the server to request hover information at a given text document position.Registration Options:
HoverRegistrationOptions
- Specified by:
hover
in interfaceTextDocumentService
-
definition
public CompletableFuture<Either<List<? extends Location>,List<? extends LocationLink>>> definition(DefinitionParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The goto definition request is sent from the client to the server to resolve the definition location of a symbol at a given text document position.Registration Options:
DefinitionRegistrationOptions
- Specified by:
definition
in interfaceTextDocumentService
-
references
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The references request is sent from the client to the server to resolve project-wide references for the symbol denoted by the given text document position.Registration Options:
ReferenceRegistrationOptions
- Specified by:
references
in interfaceTextDocumentService
-
documentSymbol
public CompletableFuture<List<Either<SymbolInformation,DocumentSymbol>>> documentSymbol(DocumentSymbolParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document symbol request is sent from the client to the server to list all symbols found in a given text document.Registration Options:
TextDocumentRegistrationOptions
Caveat: although the return type allows mixing the
Servers should whenever possible returnDocumentSymbol
andSymbolInformation
instances into a list do not do it because the clients cannot accept a heterogeneous list. A list ofDocumentSymbol
instances is only a valid return value if thetextDocument.documentSymbol.hierarchicalDocumentSymbolSupport
istrue
. More details on this difference between the LSP and the LSP4J can be found here.DocumentSymbol
since it is the richer data structure.- Specified by:
documentSymbol
in interfaceTextDocumentService
-
codeAction
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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:
CodeActionRegistrationOptions
- Specified by:
codeAction
in interfaceTextDocumentService
-
codeLens
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The code lens request is sent from the client to the server to compute code lenses for a given text document.Registration Options:
CodeLensRegistrationOptions
- Specified by:
codeLens
in interfaceTextDocumentService
-
resolveCodeLens
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The code lens resolve request is sent from the client to the server to resolve the command for a given code lens item.- Specified by:
resolveCodeLens
in interfaceTextDocumentService
-
formatting
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document formatting request is sent from the client to the server to format a whole document.Registration Options:
DocumentFormattingRegistrationOptions
- Specified by:
formatting
in interfaceTextDocumentService
-
rangeFormatting
public CompletableFuture<List<? extends TextEdit>> rangeFormatting(DocumentRangeFormattingParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document range formatting request is sent from the client to the server to format a given range in a document.Registration Options:
DocumentRangeFormattingRegistrationOptions
- Specified by:
rangeFormatting
in interfaceTextDocumentService
-
foldingRange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
- Specified by:
foldingRange
in interfaceTextDocumentService
-
prepareCallHierarchy
public CompletableFuture<List<CallHierarchyItem>> prepareCallHierarchy(CallHierarchyPrepareParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
- Specified by:
prepareCallHierarchy
in interfaceTextDocumentService
-
callHierarchyIncomingCalls
public CompletableFuture<List<CallHierarchyIncomingCall>> callHierarchyIncomingCalls(CallHierarchyIncomingCallsParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
- Specified by:
callHierarchyIncomingCalls
in interfaceTextDocumentService
-
callHierarchyOutgoingCalls
public CompletableFuture<List<CallHierarchyOutgoingCall>> callHierarchyOutgoingCalls(CallHierarchyOutgoingCallsParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
- Specified by:
callHierarchyOutgoingCalls
in interfaceTextDocumentService
-
selectionRange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
ThetextDocument/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
- Specified by:
selectionRange
in interfaceTextDocumentService
-
documentColor
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
Since 3.6.0
- Specified by:
documentColor
in interfaceTextDocumentService
-
colorPresentation
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
Since 3.6.0
- Specified by:
colorPresentation
in interfaceTextDocumentService
-
inlayHint
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The inlay hints request is sent from the client to the server to compute inlay hints for a given [text document, range] tuple that may be rendered in the editor in place with other text.Since 3.17.0
- Specified by:
inlayHint
in interfaceTextDocumentService
-
didOpen
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document open notification is sent from the client to the server to 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
- Specified by:
didOpen
in interfaceTextDocumentService
-
didChange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document change notification is sent from the client to the server to signal changes to a text document.Registration Options:
TextDocumentChangeRegistrationOptions
- Specified by:
didChange
in interfaceTextDocumentService
-
didClose
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document close notification is sent from the client to the server 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
- Specified by:
didClose
in interfaceTextDocumentService
-
didSave
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document save notification is sent from the client to the server when the document for saved in the client.Registration Options:
TextDocumentSaveRegistrationOptions
- Specified by:
didSave
in interfaceTextDocumentService
-
documentLink
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The document links request is sent from the client to the server to request the location of links in a document.Registration Options:
DocumentLinkRegistrationOptions
- Specified by:
documentLink
in interfaceTextDocumentService
-
diagnostics
- Specified by:
diagnostics
in interfaceProtocolExtension
- Parameters:
params
- Параметры запроса.- Returns:
- Список рассчитанных диагностик.
-
prepareRename
public CompletableFuture<Either3<Range,PrepareRenameResult, prepareRenamePrepareRenameDefaultBehavior>> (PrepareRenameParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
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
- Specified by:
prepareRename
in interfaceTextDocumentService
-
rename
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentService
The rename request is sent from the client to the server to do a workspace wide rename of a symbol.Registration Options:
RenameRegistrationOptions
- Specified by:
rename
in interfaceTextDocumentService
-
reset
public void reset()
-