T - the model type (ex : DOM Document)public class ModelTextDocument<T> extends TextDocument
TextDocument which is associate to a model loaded in async.| Constructor and Description |
|---|
ModelTextDocument(String text,
String uri,
BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse) |
ModelTextDocument(org.eclipse.lsp4j.TextDocumentItem document,
BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse) |
| Modifier and Type | Method and Description |
|---|---|
T |
getExistingModel()
Returns the existing parsed model synchronized with last version of the text
document and null otherwise.
|
T |
getModel()
Returns the parsed model synchronized with last version of the text document.
|
void |
setText(String text) |
void |
setVersion(int version) |
getWordRangeAt, isIncremental, lineAt, lineDelimiter, lineOffsetAt, lineText, offsetAt, positionAt, setIncremental, updatepublic ModelTextDocument(org.eclipse.lsp4j.TextDocumentItem document,
BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse)
public ModelTextDocument(String text, String uri, BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse)
public T getExistingModel()
public T getModel()
public void setText(String text)
setText in class org.eclipse.lsp4j.TextDocumentItempublic void setVersion(int version)
setVersion in class org.eclipse.lsp4j.TextDocumentItemCopyright © 2024. All rights reserved.