Package org.eclipse.lemminx.services

## Class XMLCompletions

- java.lang.Object
- - org.eclipse.lemminx.services.XMLCompletions

    public class XMLCompletions
    extends Object

XML completions support.

### Constructor Summary

Constructors
`XMLCompletions​(XMLExtensionsRegistry extensionsRegistry)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`org.eclipse.lsp4j.CompletionList` `doComplete​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings settings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`AutoCloseTagResponse` `doTagComplete​(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, XMLCompletionSettings completionSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)`
`static int` `getOffsetFollowedBy​(String s, int offset, ScannerState intialState, TokenType expectedToken)` Returns starting offset of 'expectedToken' if it the next non whitespace token after 'initialState'
`org.eclipse.lsp4j.CompletionItem` `resolveCompletionItem​(org.eclipse.lsp4j.CompletionItem unresolved, DOMDocument xmlDocument, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)` Returns the completion item with the empty fields resolved.

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

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

### Constructor Detail

#### XMLCompletions

    public XMLCompletions​(XMLExtensionsRegistry extensionsRegistry)

### Method Detail

#### 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)

Returns the completion item with the empty fields resolved.

Parameters:
  `unresolved` - the unresolved completion item
  `xmlDocument` - the model of the document where completion was triggered
  `sharedSettings` - the settings
  `cancelChecker` - the cancel checker
Returns:
  the completion item with the empty fields resolved

#### doTagComplete

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

#### getOffsetFollowedBy

    public static int getOffsetFollowedBy​(String s,
                                          int offset,
                                          ScannerState intialState,
                                          TokenType expectedToken)

Returns starting offset of 'expectedToken' if it the next non whitespace token after 'initialState'

Parameters:
  `s` -
  `offset` -
  `intialState` -
  `expectedToken` -
Returns: