Package org.eclipse.lemminx.settings.capabilities

## Class XMLCapabilityManager

- java.lang.Object
- - org.eclipse.lemminx.settings.capabilities.XMLCapabilityManager

    public class XMLCapabilityManager
    extends Object

Manager for capability related tasks A capability is a service (Formatting, Highlighting, ...) that the server is able to provide. This server will tell the client about the services it is capable of.

### Constructor Summary

Constructors
`XMLCapabilityManager​(org.eclipse.lsp4j.services.LanguageClient languageClient, XMLTextDocumentService textDocumentService)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ClientCapabilitiesWrapper` `getClientCapabilities()`
`Set<String>` `getRegisteredCapabilities()`
`void` `initializeCapabilities()` Registers all dynamic capabilities that the server does not support client side preferences turning on/off
`void` `registerCapability​(String id, String method)`
`void` `registerCapability​(String id, String method, Object options)`
`void` `registerExecuteCommand​(List<String> commands)`
`void` `setClientCapabilities​(org.eclipse.lsp4j.ClientCapabilities clientCapabilities, ExtendedClientCapabilities extendedClientCapabilities)` Creates and sets a `ClientCapabilitiesWrapper` instance formed from clientCapabilities
`void` `syncDynamicCapabilitiesWithPreferences()` Registers(indicates the servers ability to support the service) all capabilities that have the ability to be turned on/off on the client side through preferences.
`void` `toggleCapability​(boolean enabled, String id, String capability, Object options)`
`void` `unregisterCapability​(String id, String method)`

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

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

### Constructor Detail

#### XMLCapabilityManager

    public XMLCapabilityManager​(org.eclipse.lsp4j.services.LanguageClient languageClient,
                                XMLTextDocumentService textDocumentService)

### Method Detail

#### setClientCapabilities

    public void setClientCapabilities​(org.eclipse.lsp4j.ClientCapabilities clientCapabilities,
                                      ExtendedClientCapabilities extendedClientCapabilities)

Creates and sets a `ClientCapabilitiesWrapper` instance formed from clientCapabilities

Parameters:
  `clientCapabilities` -
  `extendedClientCapabilities` -

#### getClientCapabilities

    public ClientCapabilitiesWrapper getClientCapabilities()

#### toggleCapability

    public void toggleCapability​(boolean enabled,
                                 String id,
                                 String capability,
                                 Object options)

#### unregisterCapability

    public void unregisterCapability​(String id,
                                     String method)

#### registerCapability

    public void registerCapability​(String id,
                                   String method)

#### registerCapability

    public void registerCapability​(String id,
                                   String method,
                                   Object options)

#### initializeCapabilities

    public void initializeCapabilities()

Registers all dynamic capabilities that the server does not support client side preferences turning on/off

#### registerExecuteCommand

    public void registerExecuteCommand​(List<String> commands)

#### syncDynamicCapabilitiesWithPreferences

    public void syncDynamicCapabilitiesWithPreferences()

Registers(indicates the servers ability to support the service) all capabilities that have the ability to be turned on/off on the client side through preferences. In the case the preference is set to off/false this server will tell the cliet it does not support this capability. If a capability is not dynamic, it's handled by `ServerCapabilitiesInitializer`

#### getRegisteredCapabilities

    public Set<String> getRegisteredCapabilities()