Package org.eclipse.lemminx

## Class XMLLanguageServer

- java.lang.Object
- - org.eclipse.lemminx.XMLLanguageServer

All Implemented Interfaces:
  `ParentProcessWatcher.ProcessLanguageServer`, `ProgressSupport`, `XMLLanguageServerAPI`, `IXMLDocumentProvider`, `IXMLNotificationService`, `IXMLValidationService`, `org.eclipse.lsp4j.services.LanguageServer`

    public class XMLLanguageServer
    extends Object
    implements ParentProcessWatcher.ProcessLanguageServer, XMLLanguageServerAPI, IXMLDocumentProvider, IXMLNotificationService, IXMLValidationService, ProgressSupport

XML language server.

### Constructor Summary

Constructors
`XMLLanguageServer()`

### Method Summary

All Methods Instance Methods Concrete Methods
`CompletableFuture<AutoCloseTagResponse>` `closeTag​(org.eclipse.lsp4j.TextDocumentPositionParams params)`
`CompletableFuture<Void>` `createProgress​(org.eclipse.lsp4j.WorkDoneProgressCreateParams params)` Create a progress.
`void` `exit()`
`void` `exit​(int exitCode)`
`Collection<DOMDocument>` `getAllDocuments()` All known documents XML server is working with at the moment
`XMLCapabilityManager` `getCapabilityManager()`
`DOMDocument` `getDocument​(String uri)` Returns the `DOMDocument` instance from the given `uri` and null otherwise.
`XMLLanguageClientAPI` `getLanguageClient()`
`long` `getParentProcessId()`
`SharedSettings` `getSharedSettings()` Returns the current SharedSettings instance
`TelemetryManager` `getTelemetryManager()` Returns the telemetry manager.
`org.eclipse.lsp4j.services.TextDocumentService` `getTextDocumentService()`
`org.eclipse.lsp4j.services.WorkspaceService` `getWorkspaceService()`
`XMLLanguageService` `getXMLLanguageService()`
`CompletableFuture<org.eclipse.lsp4j.InitializeResult>` `initialize​(org.eclipse.lsp4j.InitializeParams params)`
`void` `initialized​(org.eclipse.lsp4j.InitializedParams params)`
`boolean` `isWorkDoneProgressSupported()` Returns true if the LSP client can support LSP progress and false otherwise.
`CompletableFuture<org.eclipse.lsp4j.Position>` `matchingTagPosition​(org.eclipse.lsp4j.TextDocumentPositionParams params)`
`void` `notifyProgress​(String progressId, org.eclipse.lsp4j.WorkDoneProgressNotification notification)` Notify the the progress notification with the given process id.
`ScheduledFuture<?>` `schedule​(Runnable command, int delay, TimeUnit unit)`

`void`

`sendNotification​(String message, org.eclipse.lsp4j.MessageType messageType, org.eclipse.lsp4j.Command... commands)`

Sends a notification to the client with the provided `message` If the client supports actionable notifications, the provided `commands` will be provided alongside the notification See `ActionableNotification` and `XMLLanguageClientAPI.actionableNotification(org.eclipse.lemminx.customservice.ActionableNotification)`

`void` `setClient​(org.eclipse.lsp4j.services.LanguageClient languageClient)`
`void` `setTrace​(org.eclipse.lsp4j.SetTraceParams params)`
`CompletableFuture<Object>` `shutdown()`
`void` `updateSettings​(Object initOptions)` Update XML settings configured from the client.
`void` `validate​(DOMDocument document, Map<String,​Object> validationArgs)` Performs XML document validation

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

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

### Methods inherited from interface org.eclipse.lemminx.services.IXMLValidationService

`validate`

### Methods inherited from interface org.eclipse.lsp4j.services.LanguageServer

`cancelProgress, getNotebookDocumentService, initialized`

### Methods inherited from interface org.eclipse.lemminx.commons.progress.ProgressSupport

`createProgressMonitor, createProgressMonitor`

### Constructor Detail

#### XMLLanguageServer

    public XMLLanguageServer()

### Method Detail

#### initialize

    public CompletableFuture<org.eclipse.lsp4j.InitializeResult> initialize​(org.eclipse.lsp4j.InitializeParams params)

Specified by:
  `initialize` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### initialized

    public void initialized​(org.eclipse.lsp4j.InitializedParams params)

Specified by:
  `initialized` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### updateSettings

    public void updateSettings​(Object initOptions)

Update XML settings configured from the client.

Parameters:
  `initOptions` - the XML settings

#### shutdown

    public CompletableFuture<Object> shutdown()

Specified by:
  `shutdown` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### exit

    public void exit()

Specified by:
  `exit` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### exit

    public void exit​(int exitCode)

Specified by:
  `exit` in interface `ParentProcessWatcher.ProcessLanguageServer`

#### getTextDocumentService

    public org.eclipse.lsp4j.services.TextDocumentService getTextDocumentService()

Specified by:
  `getTextDocumentService` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### getWorkspaceService

    public org.eclipse.lsp4j.services.WorkspaceService getWorkspaceService()

Specified by:
  `getWorkspaceService` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### setClient

    public void setClient​(org.eclipse.lsp4j.services.LanguageClient languageClient)

#### getLanguageClient

    public XMLLanguageClientAPI getLanguageClient()

#### getXMLLanguageService

    public XMLLanguageService getXMLLanguageService()

#### schedule

    public ScheduledFuture<?> schedule​(Runnable command,
                                       int delay,
                                       TimeUnit unit)

#### getParentProcessId

    public long getParentProcessId()

Specified by:
  `getParentProcessId` in interface `ParentProcessWatcher.ProcessLanguageServer`

#### closeTag

    public CompletableFuture<AutoCloseTagResponse> closeTag​(org.eclipse.lsp4j.TextDocumentPositionParams params)

Specified by:
  `closeTag` in interface `XMLLanguageServerAPI`

#### matchingTagPosition

    public CompletableFuture<org.eclipse.lsp4j.Position> matchingTagPosition​(org.eclipse.lsp4j.TextDocumentPositionParams params)

Specified by:
  `matchingTagPosition` in interface `XMLLanguageServerAPI`

#### getDocument

    public DOMDocument getDocument​(String uri)

Description copied from interface: `IXMLDocumentProvider`
Returns the `DOMDocument` instance from the given `uri` and null otherwise.

Specified by:
  `getDocument` in interface `IXMLDocumentProvider`
Parameters:
  `uri` - the document URI.
Returns:
  the `DOMDocument` instance from the given `uri` and null otherwise.

#### sendNotification

    public void sendNotification​(String message,
                                 org.eclipse.lsp4j.MessageType messageType,
                                 org.eclipse.lsp4j.Command... commands)

Description copied from interface: `IXMLNotificationService`
Sends a notification to the client with the provided `message` If the client supports actionable notifications, the provided `commands` will be provided alongside the notification See `ActionableNotification` and `XMLLanguageClientAPI.actionableNotification(org.eclipse.lemminx.customservice.ActionableNotification)`

Specified by:
  `sendNotification` in interface `IXMLNotificationService`
Parameters:
  `message` - the message to send
  `messageType` - the message type
  `commands` - the commands to send alongside the notification

#### getSharedSettings

    public SharedSettings getSharedSettings()

Description copied from interface: `IXMLNotificationService`
Returns the current SharedSettings instance

Specified by:
  `getSharedSettings` in interface `IXMLNotificationService`
Returns:
  the current SharedSettings instance

#### getAllDocuments

    public Collection<DOMDocument> getAllDocuments()

Description copied from interface: `IXMLDocumentProvider`
All known documents XML server is working with at the moment

Specified by:
  `getAllDocuments` in interface `IXMLDocumentProvider`
Returns:
  XML documents

#### validate

    public void validate​(DOMDocument document,
                         Map<String,​Object> validationArgs)

Description copied from interface: `IXMLValidationService`
Performs XML document validation

Specified by:
  `validate` in interface `IXMLValidationService`
Parameters:
  `document` - the XML document
  `validationArgs` - validation arguments.

#### getCapabilityManager

    public XMLCapabilityManager getCapabilityManager()

#### getTelemetryManager

    public TelemetryManager getTelemetryManager()

Returns the telemetry manager.

Returns:
  the telemetry manager.

#### setTrace

    public void setTrace​(org.eclipse.lsp4j.SetTraceParams params)

Specified by:
  `setTrace` in interface `org.eclipse.lsp4j.services.LanguageServer`

#### isWorkDoneProgressSupported

    public boolean isWorkDoneProgressSupported()

Description copied from interface: `ProgressSupport`
Returns true if the LSP client can support LSP progress and false otherwise.

Specified by:
  `isWorkDoneProgressSupported` in interface `ProgressSupport`
Returns:
  true if the LSP client can support LSP progress and false otherwise.

#### createProgress

    public CompletableFuture<Void> createProgress​(org.eclipse.lsp4j.WorkDoneProgressCreateParams params)

Description copied from interface: `ProgressSupport`
Create a progress.

Specified by:
  `createProgress` in interface `ProgressSupport`
Parameters:
  `params` - the progress create parameters
Returns:

#### notifyProgress

    public void notifyProgress​(String progressId,
                               org.eclipse.lsp4j.WorkDoneProgressNotification notification)

Description copied from interface: `ProgressSupport`
Notify the the progress notification with the given process id.

Specified by:
  `notifyProgress` in interface `ProgressSupport`
Parameters:
  `progressId` - the progress id.
  `notification` - the progress notification.