T - the model type (ex : DOM Document)public class ModelTextDocuments<T> extends TextDocuments<ModelTextDocument<T>>
TextDocument linked to a model.| Constructor and Description |
|---|
ModelTextDocuments(BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse) |
| Modifier and Type | Method and Description |
|---|---|
<R> CompletableFuture<R> |
computeModelAsync(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier,
BiFunction<T,org.eclipse.lsp4j.jsonrpc.CancelChecker,R> code)
Get or parse the model and apply the code function which expects the model.
|
ModelTextDocument<T> |
createDocument(org.eclipse.lsp4j.TextDocumentItem document) |
T |
getExistingModel(String uri)
Returns the model of the given text document Uri and null otherwise.
|
T |
getExistingModel(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier)
Returns the model of the given text document Uri and null otherwise.
|
T |
getModel(String uri)
Returns the model of the given text document Uri and null otherwise.
|
T |
getModel(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier)
Returns the model of the given text document Uri and null otherwise.
|
all, get, get, isIncremental, onDidChangeTextDocument, onDidCloseTextDocument, onDidOpenTextDocument, setIncrementalpublic ModelTextDocuments(BiFunction<TextDocument,org.eclipse.lsp4j.jsonrpc.CancelChecker,T> parse)
public ModelTextDocument<T> createDocument(org.eclipse.lsp4j.TextDocumentItem document)
createDocument in class TextDocuments<ModelTextDocument<T>>public T getExistingModel(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier)
uri - the text document uri.public T getExistingModel(String uri)
uri - the text document uri.public T getModel(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier)
uri - the text document uri.public T getModel(String uri)
uri - the text document uri.public <R> CompletableFuture<R> computeModelAsync(org.eclipse.lsp4j.TextDocumentIdentifier documentIdentifier, BiFunction<T,org.eclipse.lsp4j.jsonrpc.CancelChecker,R> code)
R - documentIdentifier - the document indentifier.code - a bi function that accepts the parsedmodel and
CancelChecker and returns the to be
computed valueCopyright © 2022. All rights reserved.