Class XMLCompletionSettings


  • public class XMLCompletionSettings
    extends Object
    A wrapper around LSP CompletionCapabilities.
    • Constructor Detail

      • XMLCompletionSettings

        public XMLCompletionSettings​(boolean autoCloseTags,
                                     boolean autoCloseRemovesContent)
      • XMLCompletionSettings

        public XMLCompletionSettings()
    • Method Detail

      • setCapabilities

        public void setCapabilities​(org.eclipse.lsp4j.CompletionCapabilities completionCapabilities)
      • getCompletionCapabilities

        public org.eclipse.lsp4j.CompletionCapabilities getCompletionCapabilities()
      • setAutoCloseTags

        public void setAutoCloseTags​(boolean autoCloseTags)
        Tag should be autoclosed with an end tag.
        Parameters:
        autoCloseTags -
      • isAutoCloseTags

        public boolean isAutoCloseTags()
        If tag should be autoclosed with an end tag.
        Returns:
      • setAutoCloseRemovesContent

        public void setAutoCloseRemovesContent​(boolean autoCloseRemovesContent)
        If turning a start tag into a self closing tag should remove the content of the element
        Parameters:
        autoCloseRemovesContent -
      • isAutoCloseRemovesContent

        public boolean isAutoCloseRemovesContent()
        Returns true if turning a start tag into a self closing tag should remove the content of the element and false otherwise
        Returns:
        true if turning a start tag into a self closing tag should remove the content of the element and false otherwise
      • isCompletionSnippetsSupported

        public boolean isCompletionSnippetsSupported()
        Returns true if the client support snippet and false otherwise.
        Returns:
        true if the client support snippet and false otherwise.
      • isCompletionListItemDefaultsSupport

        public boolean isCompletionListItemDefaultsSupport​(String field)
        Returns true if the client support completion list itemDefaults given the field and false otherwise.
        Parameters:
        field - the completionList itemDefaults field
        Returns:
        true if the client support completion list itemDefaults given the field and false otherwise.
      • merge

        public void merge​(XMLCompletionSettings newCompletion)
        Merge only the given completion settings (and not the capability) in the settings.
        Parameters:
        newCompletion - the new settings to merge.