Package org.eclipse.lemminx
Class CompositeTextDocumentService
java.lang.Object
org.eclipse.lemminx.CompositeTextDocumentService
- All Implemented Interfaces:
org.eclipse.lsp4j.services.TextDocumentService
public class CompositeTextDocumentService
extends Object
implements org.eclipse.lsp4j.services.TextDocumentService
Composite text document service that routes LSP requests to the appropriate
AbstractTextDocumentService based on file type.
Contributed services are discovered via ServiceLoader using the
ITextDocumentServiceContribution SPI. If no contributed service
handles a given URI, requests are routed to the default
XMLTextDocumentService.
-
Constructor Summary
ConstructorsConstructorDescriptionCompositeTextDocumentService(XMLTextDocumentService defaultService, XMLLanguageServer server) -
Method Summary
Modifier and TypeMethodDescriptionReturns a stream of all open document URIs across the default XML service and all contributed services (e.g.voidCompletableFuture<List<org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.Command, org.eclipse.lsp4j.CodeAction>>> codeAction(org.eclipse.lsp4j.CodeActionParams params) CompletableFuture<List<? extends org.eclipse.lsp4j.CodeLens>> codeLens(org.eclipse.lsp4j.CodeLensParams params) CompletableFuture<List<org.eclipse.lsp4j.ColorPresentation>> colorPresentation(org.eclipse.lsp4j.ColorPresentationParams params) CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<org.eclipse.lsp4j.CompletionItem>, org.eclipse.lsp4j.CompletionList>> completion(org.eclipse.lsp4j.CompletionParams params) CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<? extends org.eclipse.lsp4j.Location>, List<? extends org.eclipse.lsp4j.LocationLink>>> definition(org.eclipse.lsp4j.DefinitionParams params) voiddidChange(org.eclipse.lsp4j.DidChangeTextDocumentParams params) voiddidClose(org.eclipse.lsp4j.DidCloseTextDocumentParams params) voiddidOpen(org.eclipse.lsp4j.DidOpenTextDocumentParams params) voiddidSave(org.eclipse.lsp4j.DidSaveTextDocumentParams params) CompletableFuture<List<org.eclipse.lsp4j.ColorInformation>> documentColor(org.eclipse.lsp4j.DocumentColorParams params) CompletableFuture<List<? extends org.eclipse.lsp4j.DocumentHighlight>> documentHighlight(org.eclipse.lsp4j.DocumentHighlightParams params) CompletableFuture<List<org.eclipse.lsp4j.DocumentLink>> documentLink(org.eclipse.lsp4j.DocumentLinkParams params) CompletableFuture<List<org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.SymbolInformation, org.eclipse.lsp4j.DocumentSymbol>>> documentSymbol(org.eclipse.lsp4j.DocumentSymbolParams params) CompletableFuture<List<org.eclipse.lsp4j.FoldingRange>> foldingRange(org.eclipse.lsp4j.FoldingRangeRequestParams params) CompletableFuture<List<? extends org.eclipse.lsp4j.TextEdit>> formatting(org.eclipse.lsp4j.DocumentFormattingParams params) CompletableFuture<org.eclipse.lsp4j.Hover> hover(org.eclipse.lsp4j.HoverParams params) CompletableFuture<List<org.eclipse.lsp4j.InlayHint>> inlayHint(org.eclipse.lsp4j.InlayHintParams params) CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<org.eclipse.lsp4j.InlineCompletionItem>, org.eclipse.lsp4j.InlineCompletionList>> inlineCompletion(org.eclipse.lsp4j.InlineCompletionParams params) CompletableFuture<org.eclipse.lsp4j.LinkedEditingRanges> linkedEditingRange(org.eclipse.lsp4j.LinkedEditingRangeParams params) voidNotifies all contributed text-document services that the workspace index scan has completed.CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either3<org.eclipse.lsp4j.Range, org.eclipse.lsp4j.PrepareRenameResult, org.eclipse.lsp4j.PrepareRenameDefaultBehavior>> prepareRename(org.eclipse.lsp4j.PrepareRenameParams params) CompletableFuture<List<? extends org.eclipse.lsp4j.TextEdit>> rangeFormatting(org.eclipse.lsp4j.DocumentRangeFormattingParams params) CompletableFuture<List<? extends org.eclipse.lsp4j.Location>> references(org.eclipse.lsp4j.ReferenceParams params) CompletableFuture<org.eclipse.lsp4j.WorkspaceEdit> rename(org.eclipse.lsp4j.RenameParams params) CompletableFuture<org.eclipse.lsp4j.CodeAction> resolveCodeAction(org.eclipse.lsp4j.CodeAction unresolved) CompletableFuture<org.eclipse.lsp4j.CompletionItem> resolveCompletionItem(org.eclipse.lsp4j.CompletionItem unresolved) CompletableFuture<List<org.eclipse.lsp4j.SelectionRange>> selectionRange(org.eclipse.lsp4j.SelectionRangeParams params) CompletableFuture<org.eclipse.lsp4j.SemanticTokens> semanticTokensFull(org.eclipse.lsp4j.SemanticTokensParams params) voidsetClientConfigurationSupport(Boolean supported) CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<? extends org.eclipse.lsp4j.Location>, List<? extends org.eclipse.lsp4j.LocationLink>>> typeDefinition(org.eclipse.lsp4j.TypeDefinitionParams params) voidupdateContributedSettings(Object initSettings) 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
callHierarchyIncomingCalls, callHierarchyOutgoingCalls, declaration, diagnostic, documentLinkResolve, implementation, inlineValue, moniker, onTypeFormatting, prepareCallHierarchy, prepareTypeHierarchy, rangesFormatting, resolveCodeLens, resolveInlayHint, semanticTokensFullDelta, semanticTokensRange, signatureHelp, typeHierarchySubtypes, typeHierarchySupertypes, willSave, willSaveWaitUntil
-
Constructor Details
-
CompositeTextDocumentService
public CompositeTextDocumentService(XMLTextDocumentService defaultService, XMLLanguageServer server)
-
-
Method Details
-
getXMLTextDocumentService
-
notifyIndexScanCompleted
public void notifyIndexScanCompleted()Notifies all contributed text-document services that the workspace index scan has completed. Each contributed service can overrideAbstractTextDocumentService.onIndexScanCompleted()to re-validate its open documents (e.g. RNC re-validates "missing start" suppression). -
allDocumentUris
Returns a stream of all open document URIs across the default XML service and all contributed services (e.g. RNC). Used by the code-lens refresh filter so that aworkspace/codeLens/refreshis sent whenever any grammar file is open, regardless of which text-document service tracks it. -
setClientConfigurationSupport
-
clearAllScopedSettings
public void clearAllScopedSettings() -
updateContributedSettings
-
didOpen
public void didOpen(org.eclipse.lsp4j.DidOpenTextDocumentParams params) - Specified by:
didOpenin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
didChange
public void didChange(org.eclipse.lsp4j.DidChangeTextDocumentParams params) - Specified by:
didChangein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
didClose
public void didClose(org.eclipse.lsp4j.DidCloseTextDocumentParams params) - Specified by:
didClosein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
didSave
public void didSave(org.eclipse.lsp4j.DidSaveTextDocumentParams params) - Specified by:
didSavein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
completion
public CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<org.eclipse.lsp4j.CompletionItem>,org.eclipse.lsp4j.CompletionList>> completion(org.eclipse.lsp4j.CompletionParams params) - Specified by:
completionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
resolveCompletionItem
public CompletableFuture<org.eclipse.lsp4j.CompletionItem> resolveCompletionItem(org.eclipse.lsp4j.CompletionItem unresolved) - Specified by:
resolveCompletionItemin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
inlineCompletion
public CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<org.eclipse.lsp4j.InlineCompletionItem>,org.eclipse.lsp4j.InlineCompletionList>> inlineCompletion(org.eclipse.lsp4j.InlineCompletionParams params) - Specified by:
inlineCompletionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
hover
- Specified by:
hoverin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
documentHighlight
public CompletableFuture<List<? extends org.eclipse.lsp4j.DocumentHighlight>> documentHighlight(org.eclipse.lsp4j.DocumentHighlightParams params) - Specified by:
documentHighlightin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
documentSymbol
public CompletableFuture<List<org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.SymbolInformation,org.eclipse.lsp4j.DocumentSymbol>>> documentSymbol(org.eclipse.lsp4j.DocumentSymbolParams params) - Specified by:
documentSymbolin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
formatting
public CompletableFuture<List<? extends org.eclipse.lsp4j.TextEdit>> formatting(org.eclipse.lsp4j.DocumentFormattingParams params) - Specified by:
formattingin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
rangeFormatting
public CompletableFuture<List<? extends org.eclipse.lsp4j.TextEdit>> rangeFormatting(org.eclipse.lsp4j.DocumentRangeFormattingParams params) - Specified by:
rangeFormattingin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
prepareRename
public CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either3<org.eclipse.lsp4j.Range,org.eclipse.lsp4j.PrepareRenameResult, prepareRenameorg.eclipse.lsp4j.PrepareRenameDefaultBehavior>> (org.eclipse.lsp4j.PrepareRenameParams params) - Specified by:
prepareRenamein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
rename
public CompletableFuture<org.eclipse.lsp4j.WorkspaceEdit> rename(org.eclipse.lsp4j.RenameParams params) - Specified by:
renamein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
definition
public CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<? extends org.eclipse.lsp4j.Location>,List<? extends org.eclipse.lsp4j.LocationLink>>> definition(org.eclipse.lsp4j.DefinitionParams params) - Specified by:
definitionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
typeDefinition
public CompletableFuture<org.eclipse.lsp4j.jsonrpc.messages.Either<List<? extends org.eclipse.lsp4j.Location>,List<? extends org.eclipse.lsp4j.LocationLink>>> typeDefinition(org.eclipse.lsp4j.TypeDefinitionParams params) - Specified by:
typeDefinitionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
references
public CompletableFuture<List<? extends org.eclipse.lsp4j.Location>> references(org.eclipse.lsp4j.ReferenceParams params) - Specified by:
referencesin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
codeAction
public CompletableFuture<List<org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.Command,org.eclipse.lsp4j.CodeAction>>> codeAction(org.eclipse.lsp4j.CodeActionParams params) - Specified by:
codeActionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
resolveCodeAction
public CompletableFuture<org.eclipse.lsp4j.CodeAction> resolveCodeAction(org.eclipse.lsp4j.CodeAction unresolved) - Specified by:
resolveCodeActionin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
codeLens
public CompletableFuture<List<? extends org.eclipse.lsp4j.CodeLens>> codeLens(org.eclipse.lsp4j.CodeLensParams params) - Specified by:
codeLensin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
foldingRange
public CompletableFuture<List<org.eclipse.lsp4j.FoldingRange>> foldingRange(org.eclipse.lsp4j.FoldingRangeRequestParams params) - Specified by:
foldingRangein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
documentLink
public CompletableFuture<List<org.eclipse.lsp4j.DocumentLink>> documentLink(org.eclipse.lsp4j.DocumentLinkParams params) - Specified by:
documentLinkin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
selectionRange
public CompletableFuture<List<org.eclipse.lsp4j.SelectionRange>> selectionRange(org.eclipse.lsp4j.SelectionRangeParams params) - Specified by:
selectionRangein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
linkedEditingRange
public CompletableFuture<org.eclipse.lsp4j.LinkedEditingRanges> linkedEditingRange(org.eclipse.lsp4j.LinkedEditingRangeParams params) - Specified by:
linkedEditingRangein interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
documentColor
public CompletableFuture<List<org.eclipse.lsp4j.ColorInformation>> documentColor(org.eclipse.lsp4j.DocumentColorParams params) - Specified by:
documentColorin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
colorPresentation
public CompletableFuture<List<org.eclipse.lsp4j.ColorPresentation>> colorPresentation(org.eclipse.lsp4j.ColorPresentationParams params) - Specified by:
colorPresentationin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
semanticTokensFull
public CompletableFuture<org.eclipse.lsp4j.SemanticTokens> semanticTokensFull(org.eclipse.lsp4j.SemanticTokensParams params) - Specified by:
semanticTokensFullin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-
inlayHint
public CompletableFuture<List<org.eclipse.lsp4j.InlayHint>> inlayHint(org.eclipse.lsp4j.InlayHintParams params) - Specified by:
inlayHintin interfaceorg.eclipse.lsp4j.services.TextDocumentService
-