Class ModelTextDocument<T>

  • Type Parameters:
    T - the model type (ex : DOM Document)

    public class ModelTextDocument<T>
    extends TextDocument
    A TextDocument which is associate to a model loaded in async.
    Author:
    Angelo ZERR
    • Constructor Detail

      • ModelTextDocument

        public ModelTextDocument​(org.eclipse.lsp4j.TextDocumentItem document,
                                 BiFunction<TextDocument,​org.eclipse.lsp4j.jsonrpc.CancelChecker,​T> parse)
    • Method Detail

      • getExistingModel

        public T getExistingModel()
        Returns the existing parsed model synchronized with last version of the text document and null otherwise.
        Returns:
        the existing parsed model synchronized with last version of the text document and null otherwise.
      • getModel

        public T getModel()
        Returns the parsed model synchronized with last version of the text document.
        Returns:
        the parsed model synchronized with last version of the text document.
      • setText

        public void setText​(String text)
        Overrides:
        setText in class org.eclipse.lsp4j.TextDocumentItem
      • setVersion

        public void setVersion​(int version)
        Overrides:
        setVersion in class org.eclipse.lsp4j.TextDocumentItem