Package org.eclipse.lemminx.services

## Class XMLLanguageService

- java.lang.Object
- - org.eclipse.lemminx.services.extensions.XMLExtensionsRegistry
  - - org.eclipse.lemminx.services.XMLLanguageService

All Implemented Interfaces:
  `IComponentProvider`, `IXMLFullFormatter`, `IXMLMinifier`

    public class XMLLanguageService
    extends XMLExtensionsRegistry
    implements IXMLFullFormatter, IXMLMinifier

XML Language service.

### Constructor Summary

Constructors
`XMLLanguageService()`

### Method Summary

All Methods Instance Methods Concrete Methods
`AutoCloseTagResponse` `doAutoClose​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, XMLCompletionSettings completionSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.CodeAction>` `doCodeActions​(org.eclipse.lsp4j.CodeActionContext context, org.eclipse.lsp4j.Range range, DOMDocument document, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.CompletionList` `doComplete​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings settings)`
`org.eclipse.lsp4j.CompletionList` `doComplete​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings settings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.Diagnostic>` `doDiagnostics​(DOMDocument xmlDocument, XMLValidationSettings validationSettings, Map<String,​Object> validationArgs, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.Hover` `doHover​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings sharedSettings)`
`org.eclipse.lsp4j.Hover` `doHover​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.WorkspaceEdit` `doRename​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, String newText, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`AutoCloseTagResponse` `doTagComplete​(DOMDocument xmlDocument, XMLCompletionSettings completionSettings, org.eclipse.lsp4j.Position position)`
`AutoCloseTagResponse` `doTagComplete​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, XMLCompletionSettings completionSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<? extends org.eclipse.lsp4j.LocationLink>` `findDefinition​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.ColorInformation>` `findDocumentColors​(DOMDocument xmlDocument, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.DocumentHighlight>` `findDocumentHighlights​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position)`
`List<org.eclipse.lsp4j.DocumentHighlight>` `findDocumentHighlights​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.DocumentLink>` `findDocumentLinks​(DOMDocument document)`
`List<org.eclipse.lsp4j.DocumentSymbol>` `findDocumentSymbols​(DOMDocument xmlDocument, XMLSymbolSettings symbolSettings)`
`DocumentSymbolsResult` `findDocumentSymbols​(DOMDocument xmlDocument, XMLSymbolSettings symbolSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.LinkedEditingRanges` `findLinkedEditingRanges​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)` Returns the linked editing ranges for the given `xmlDocument` at the given `position` and null otherwise.
`List<? extends org.eclipse.lsp4j.Location>` `findReferences​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.ReferenceContext context, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.SymbolInformation>` `findSymbolInformations​(DOMDocument xmlDocument, XMLSymbolSettings symbolSettings)`
`SymbolInformationResult` `findSymbolInformations​(DOMDocument xmlDocument, XMLSymbolSettings symbolSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<? extends org.eclipse.lsp4j.LocationLink>` `findTypeDefinition​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<? extends org.eclipse.lsp4j.TextEdit>` `format​(DOMDocument xmlDocument, org.eclipse.lsp4j.Range range, SharedSettings sharedSettings)`
`String` `formatFull​(String text, String uri, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)` Format the given text document by the shared settings.
`List<? extends org.eclipse.lsp4j.CodeLens>` `getCodeLens​(DOMDocument xmlDocument, XMLCodeLensSettings settings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.ColorPresentation>` `getColorPresentations​(DOMDocument xmlDocument, org.eclipse.lsp4j.ColorPresentationParams params, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.FoldingRange>` `getFoldingRanges​(DOMDocument xmlDocument, XMLFoldingSettings context)`
`List<org.eclipse.lsp4j.FoldingRange>` `getFoldingRanges​(DOMDocument xmlDocument, XMLFoldingSettings context, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.Position` `getMatchingTagPosition​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`List<org.eclipse.lsp4j.SelectionRange>` `getSelectionRanges​(DOMDocument xmlDocument, List<org.eclipse.lsp4j.Position> positions, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`String` `minify​(String text, String uri, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)` Minify the given text document.
`List<? extends org.eclipse.lsp4j.TextEdit>` `minify​(DOMDocument xmlDocument, org.eclipse.lsp4j.Range range, SharedSettings sharedSettings)`
`org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.Range,​org.eclipse.lsp4j.PrepareRenameResult>` `prepareRename​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`CompletableFuture<Void>` `publishDiagnostics​(DOMDocument xmlDocument, Consumer<org.eclipse.lsp4j.PublishDiagnosticsParams> publishDiagnostics, Consumer<TextDocument> triggerValidation, XMLValidationRootSettings validationSettings, Map<String,​Object> validationArgs, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.CodeAction` `resolveCodeAction​(org.eclipse.lsp4j.CodeAction unresolved, DOMDocument document, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`org.eclipse.lsp4j.CompletionItem` `resolveCompletionItem​(org.eclipse.lsp4j.CompletionItem unresolved, DOMDocument xmlDocument, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`

### Methods inherited from class org.eclipse.lemminx.services.extensions.XMLExtensionsRegistry

`dispose, doSave, getCodeActionsParticipants, getCodeLensParticipants, getCommandService, getCompletionParticipants, getComponent, getDefinitionParticipants, getDiagnosticsParticipants, getDocumentColorParticipants, getDocumentLifecycleParticipants, getDocumentLinkParticipants, getDocumentProvider, getExtensions, getFormatterParticipants, getHighlightingParticipants, getHoverParticipants, getLinkedEditingRangesParticipants, getNotificationService, getProgressSupport, getReferenceParticipants, getRenameParticipants, getResolverExtensionManager, getSymbolsProviderParticipants, getTelemetryManager, getTypeDefinitionParticipants, getValidationService, getWorkspaceServiceParticipants, initializeIfNeeded, initializeParams, registerCodeActionParticipant, registerCodeLensParticipant, registerCompletionParticipant, registerComponent, registerDefinitionParticipant, registerDiagnosticsParticipant, registerDocumentColorParticipant, registerDocumentLifecycleParticipant, registerDocumentLinkParticipant, registerFormatterParticipant, registerHighlightingParticipant, registerHoverParticipant, registerLinkedEditingRangesParticipants, registerReferenceParticipant, registerRenameParticipant, registerSymbolsProviderParticipant, registerTypeDefinitionParticipant, registerWorkspaceServiceParticipant, setCommandService, setDocumentProvider, setNotificationService, setProgressSupport, setTelemetryManager, setValidationService, unregisterCodeActionParticipant, unregisterCodeLensParticipant, unregisterCompletionParticipant, unregisterDefinitionParticipant, unregisterDiagnosticsParticipant, unregisterDocumentColorParticipant, unregisterDocumentLifecycleParticipant, unregisterDocumentLinkParticipant, unregisterFormatterParticipant, unregisterHighlightingParticipant, unregisterHoverParticipant, unregisterLinkedEditingRangesParticipants, unregisterReferenceParticipant, unregisterRenameParticipant, unregisterSymbolsProviderParticipant, unregisterTypeDefinitionParticipant, unregisterWorkspaceServiceParticipant`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XMLLanguageService

    public XMLLanguageService()

### Method Detail

#### formatFull

    public String formatFull​(String text,
                             String uri,
                             SharedSettings sharedSettings,
                             org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

Description copied from interface: `IXMLFullFormatter`
Format the given text document by the shared settings.

Specified by:
  `formatFull` in interface `IXMLFullFormatter`
Parameters:
  `text` - the text.
  `uri` - the uri.
  `sharedSettings` - the shared settings.
Returns:
  the formatted text document by using the shared settings.

#### format

    public List<? extends org.eclipse.lsp4j.TextEdit> format​(DOMDocument xmlDocument,
                                                             org.eclipse.lsp4j.Range range,
                                                             SharedSettings sharedSettings)

#### minify

    public String minify​(String text,
                         String uri,
                         SharedSettings sharedSettings,
                         org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

Description copied from interface: `IXMLMinifier`
Minify the given text document.

Specified by:
  `minify` in interface `IXMLMinifier`
Parameters:
  `text` - the text.
  `uri` - the uri.
  `sharedSettings` - the shared settings.
  `cancelChecker` - the cancel checker.
Returns:
  the minified text document.

#### minify

    public List<? extends org.eclipse.lsp4j.TextEdit> minify​(DOMDocument xmlDocument,
                                                             org.eclipse.lsp4j.Range range,
                                                             SharedSettings sharedSettings)

#### findDocumentHighlights

    public List<org.eclipse.lsp4j.DocumentHighlight> findDocumentHighlights​(DOMDocument xmlDocument,
                                                                            org.eclipse.lsp4j.Position position)

#### findDocumentHighlights

    public List<org.eclipse.lsp4j.DocumentHighlight> findDocumentHighlights​(DOMDocument xmlDocument,
                                                                            org.eclipse.lsp4j.Position position,
                                                                            org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findSymbolInformations

    public List<org.eclipse.lsp4j.SymbolInformation> findSymbolInformations​(DOMDocument xmlDocument,
                                                                            XMLSymbolSettings symbolSettings)

#### findSymbolInformations

    public SymbolInformationResult findSymbolInformations​(DOMDocument xmlDocument,
                                                          XMLSymbolSettings symbolSettings,
                                                          org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findDocumentSymbols

    public List<org.eclipse.lsp4j.DocumentSymbol> findDocumentSymbols​(DOMDocument xmlDocument,
                                                                      XMLSymbolSettings symbolSettings)

#### findDocumentSymbols

    public DocumentSymbolsResult findDocumentSymbols​(DOMDocument xmlDocument,
                                                     XMLSymbolSettings symbolSettings,
                                                     org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doComplete

    public org.eclipse.lsp4j.CompletionList doComplete​(DOMDocument xmlDocument,
                                                       org.eclipse.lsp4j.Position position,
                                                       SharedSettings settings)

#### doComplete

    public org.eclipse.lsp4j.CompletionList doComplete​(DOMDocument xmlDocument,
                                                       org.eclipse.lsp4j.Position position,
                                                       SharedSettings settings,
                                                       org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### resolveCompletionItem

    public org.eclipse.lsp4j.CompletionItem resolveCompletionItem​(org.eclipse.lsp4j.CompletionItem unresolved,
                                                                  DOMDocument xmlDocument,
                                                                  SharedSettings sharedSettings,
                                                                  org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doHover

    public org.eclipse.lsp4j.Hover doHover​(DOMDocument xmlDocument,
                                           org.eclipse.lsp4j.Position position,
                                           SharedSettings sharedSettings)

#### doHover

    public org.eclipse.lsp4j.Hover doHover​(DOMDocument xmlDocument,
                                           org.eclipse.lsp4j.Position position,
                                           SharedSettings sharedSettings,
                                           org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doDiagnostics

    public List<org.eclipse.lsp4j.Diagnostic> doDiagnostics​(DOMDocument xmlDocument,
                                                            XMLValidationSettings validationSettings,
                                                            Map<String,​Object> validationArgs,
                                                            org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### publishDiagnostics

    public CompletableFuture<Void> publishDiagnostics​(DOMDocument xmlDocument,
                                                      Consumer<org.eclipse.lsp4j.PublishDiagnosticsParams> publishDiagnostics,
                                                      Consumer<TextDocument> triggerValidation,
                                                      XMLValidationRootSettings validationSettings,
                                                      Map<String,​Object> validationArgs,
                                                      org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### getFoldingRanges

    public List<org.eclipse.lsp4j.FoldingRange> getFoldingRanges​(DOMDocument xmlDocument,
                                                                 XMLFoldingSettings context)

#### getFoldingRanges

    public List<org.eclipse.lsp4j.FoldingRange> getFoldingRanges​(DOMDocument xmlDocument,
                                                                 XMLFoldingSettings context,
                                                                 org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### getSelectionRanges

    public List<org.eclipse.lsp4j.SelectionRange> getSelectionRanges​(DOMDocument xmlDocument,
                                                                     List<org.eclipse.lsp4j.Position> positions,
                                                                     org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### prepareRename

    public org.eclipse.lsp4j.jsonrpc.messages.Either<org.eclipse.lsp4j.Range,​org.eclipse.lsp4j.PrepareRenameResult> prepareRename​(DOMDocument xmlDocument,
                                                                                                                                        org.eclipse.lsp4j.Position position,
                                                                                                                                        org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doRename

    public org.eclipse.lsp4j.WorkspaceEdit doRename​(DOMDocument xmlDocument,
                                                    org.eclipse.lsp4j.Position position,
                                                    String newText,
                                                    org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findDocumentLinks

    public List<org.eclipse.lsp4j.DocumentLink> findDocumentLinks​(DOMDocument document)

#### findDocumentColors

    public List<org.eclipse.lsp4j.ColorInformation> findDocumentColors​(DOMDocument xmlDocument,
                                                                       org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### getColorPresentations

    public List<org.eclipse.lsp4j.ColorPresentation> getColorPresentations​(DOMDocument xmlDocument,
                                                                           org.eclipse.lsp4j.ColorPresentationParams params,
                                                                           org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findDefinition

    public List<? extends org.eclipse.lsp4j.LocationLink> findDefinition​(DOMDocument xmlDocument,
                                                                         org.eclipse.lsp4j.Position position,
                                                                         org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findTypeDefinition

    public List<? extends org.eclipse.lsp4j.LocationLink> findTypeDefinition​(DOMDocument xmlDocument,
                                                                             org.eclipse.lsp4j.Position position,
                                                                             org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findReferences

    public List<? extends org.eclipse.lsp4j.Location> findReferences​(DOMDocument xmlDocument,
                                                                     org.eclipse.lsp4j.Position position,
                                                                     org.eclipse.lsp4j.ReferenceContext context,
                                                                     org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### getCodeLens

    public List<? extends org.eclipse.lsp4j.CodeLens> getCodeLens​(DOMDocument xmlDocument,
                                                                  XMLCodeLensSettings settings,
                                                                  org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doCodeActions

    public List<org.eclipse.lsp4j.CodeAction> doCodeActions​(org.eclipse.lsp4j.CodeActionContext context,
                                                            org.eclipse.lsp4j.Range range,
                                                            DOMDocument document,
                                                            SharedSettings sharedSettings,
                                                            org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### resolveCodeAction

    public org.eclipse.lsp4j.CodeAction resolveCodeAction​(org.eclipse.lsp4j.CodeAction unresolved,
                                                          DOMDocument document,
                                                          SharedSettings sharedSettings,
                                                          org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doTagComplete

    public AutoCloseTagResponse doTagComplete​(DOMDocument xmlDocument,
                                              XMLCompletionSettings completionSettings,
                                              org.eclipse.lsp4j.Position position)

#### doTagComplete

    public AutoCloseTagResponse doTagComplete​(DOMDocument xmlDocument,
                                              org.eclipse.lsp4j.Position position,
                                              XMLCompletionSettings completionSettings,
                                              org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### doAutoClose

    public AutoCloseTagResponse doAutoClose​(DOMDocument xmlDocument,
                                            org.eclipse.lsp4j.Position position,
                                            XMLCompletionSettings completionSettings,
                                            org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### getMatchingTagPosition

    public org.eclipse.lsp4j.Position getMatchingTagPosition​(DOMDocument xmlDocument,
                                                             org.eclipse.lsp4j.Position position,
                                                             org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

#### findLinkedEditingRanges

    public org.eclipse.lsp4j.LinkedEditingRanges findLinkedEditingRanges​(DOMDocument xmlDocument,
                                                                         org.eclipse.lsp4j.Position position,
                                                                         org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)

Returns the linked editing ranges for the given `xmlDocument` at the given `position` and null otherwise.

Parameters:
  `xmlDocument` - the DOM document.
  `position` - the position.
  `cancelChecker` - the cancel checker.
Returns:
  the linked editing ranges for the given `xmlDocument` at the given `position` and null otherwise.