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 Constructor Description XMLCompletions(XMLExtensionsRegistry extensionsRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.lsp4j.CompletionListdoComplete(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, SharedSettings settings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)AutoCloseTagResponsedoTagComplete(DOMDocument xmlDocument, org.eclipse.lsp4j.Position position, XMLCompletionSettings completionSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)static intgetOffsetFollowedBy(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.CompletionItemresolveCompletionItem(org.eclipse.lsp4j.CompletionItem unresolved, DOMDocument xmlDocument, SharedSettings sharedSettings, org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)Returns the completion item with the empty fields resolved.
-
-
-
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 itemxmlDocument- the model of the document where completion was triggeredsharedSettings- the settingscancelChecker- 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:
-
-