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) -
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) voiddidChange(DidChangeTextDocumentParams params) The document change notification is sent from the client to the server to signal changes to a text document.voiddidClose(DidCloseTextDocumentParams params) The document close notification is sent from the client to the server when the document got closed in the client.voiddidOpen(DidOpenTextDocumentParams params) The document open notification is sent from the client to the server to signal newly opened text documents.voiddidSave(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.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.voidreset()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/selectionRangerequest 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, waitMethods inherited from interface org.eclipse.lsp4j.services.TextDocumentService
completion, declaration, diagnostic, documentHighlight, documentLinkResolve, implementation, inlayHint, 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"}) 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)
-
-
Method Details
-
hover
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
hoverin interfaceTextDocumentService
-
definition
public CompletableFuture<Either<List<? extends Location>,List<? extends LocationLink>>> definition(DefinitionParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
definitionin interfaceTextDocumentService
-
references
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
referencesin interfaceTextDocumentService
-
documentSymbol
public CompletableFuture<List<Either<SymbolInformation,DocumentSymbol>>> documentSymbol(DocumentSymbolParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe document symbol request is sent from the client to the server to list all symbols found in a given text document.Registration Options:
TextDocumentRegistrationOptionsCaveat: although the return type allows mixing the
Servers should whenever possible returnDocumentSymbolandSymbolInformationinstances into a list do not do it because the clients cannot accept a heterogeneous list. A list ofDocumentSymbolinstances is only a valid return value if thetextDocument.documentSymbol.hierarchicalDocumentSymbolSupportistrue. More details on this difference between the LSP and the LSP4J can be found here.DocumentSymbolsince it is the richer data structure.- Specified by:
documentSymbolin interfaceTextDocumentService
-
codeAction
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
codeActionin interfaceTextDocumentService
-
codeLens
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
codeLensin interfaceTextDocumentService
-
resolveCodeLens
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe code lens resolve request is sent from the client to the server to resolve the command for a given code lens item.- Specified by:
resolveCodeLensin interfaceTextDocumentService
-
formatting
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe document formatting request is sent from the client to the server to format a whole document.Registration Options:
DocumentFormattingRegistrationOptions- Specified by:
formattingin interfaceTextDocumentService
-
rangeFormatting
public CompletableFuture<List<? extends TextEdit>> rangeFormatting(DocumentRangeFormattingParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
rangeFormattingin interfaceTextDocumentService
-
foldingRange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
foldingRangein interfaceTextDocumentService
-
prepareCallHierarchy
public CompletableFuture<List<CallHierarchyItem>> prepareCallHierarchy(CallHierarchyPrepareParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceBootstraps 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:
prepareCallHierarchyin interfaceTextDocumentService
-
callHierarchyIncomingCalls
public CompletableFuture<List<CallHierarchyIncomingCall>> callHierarchyIncomingCalls(CallHierarchyIncomingCallsParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceProvide 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:
callHierarchyIncomingCallsin interfaceTextDocumentService
-
callHierarchyOutgoingCalls
public CompletableFuture<List<CallHierarchyOutgoingCall>> callHierarchyOutgoingCalls(CallHierarchyOutgoingCallsParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceProvide 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:
callHierarchyOutgoingCallsin interfaceTextDocumentService
-
selectionRange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThetextDocument/selectionRangerequest 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:
selectionRangein interfaceTextDocumentService
-
documentColor
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
documentColorin interfaceTextDocumentService
-
colorPresentation
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
colorPresentationin interfaceTextDocumentService
-
didOpen
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
didOpenin interfaceTextDocumentService
-
didChange
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe document change notification is sent from the client to the server to signal changes to a text document.Registration Options:
TextDocumentChangeRegistrationOptions- Specified by:
didChangein interfaceTextDocumentService
-
didClose
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
didClosein interfaceTextDocumentService
-
didSave
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe document save notification is sent from the client to the server when the document for saved in the client.Registration Options:
TextDocumentSaveRegistrationOptions- Specified by:
didSavein interfaceTextDocumentService
-
documentLink
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
documentLinkin interfaceTextDocumentService
-
diagnostics
- Specified by:
diagnosticsin interfaceProtocolExtension- Parameters:
params- Параметры запроса.- Returns:
- Список рассчитанных диагностик.
-
prepareRename
public CompletableFuture<Either<Range,PrepareRenameResult>> prepareRename(PrepareRenameParams params) Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe 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:
prepareRenamein interfaceTextDocumentService
-
rename
Description copied from interface:org.eclipse.lsp4j.services.TextDocumentServiceThe rename request is sent from the client to the server to do a workspace wide rename of a symbol.Registration Options:
RenameRegistrationOptions- Specified by:
renamein interfaceTextDocumentService
-
reset
public void reset()
-