Class XMLCompletions


  • public class XMLCompletions
    extends Object
    XML completions support.
    • 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
      • 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: