public class TextDocument
extends org.eclipse.lsp4j.TextDocumentItem
TextDocumentItem
to provide methods to
retrieve position.Constructor and Description |
---|
TextDocument(String text,
String uri) |
TextDocument(org.eclipse.lsp4j.TextDocumentItem document) |
Modifier and Type | Method and Description |
---|---|
org.eclipse.lsp4j.Range |
getWordRangeAt(int textOffset,
Pattern wordDefinition) |
boolean |
isIncremental() |
String |
lineDelimiter(int lineNumber) |
String |
lineText(int lineNumber) |
int |
offsetAt(org.eclipse.lsp4j.Position position) |
org.eclipse.lsp4j.Position |
positionAt(int position) |
void |
setIncremental(boolean incremental) |
void |
update(List<org.eclipse.lsp4j.TextDocumentContentChangeEvent> changes)
Update text of the document by using the changes and according the
incremental support.
|
public void setIncremental(boolean incremental)
public boolean isIncremental()
public org.eclipse.lsp4j.Position positionAt(int position) throws BadLocationException
BadLocationException
public int offsetAt(org.eclipse.lsp4j.Position position) throws BadLocationException
BadLocationException
public String lineText(int lineNumber) throws BadLocationException
BadLocationException
public String lineDelimiter(int lineNumber) throws BadLocationException
BadLocationException
public org.eclipse.lsp4j.Range getWordRangeAt(int textOffset, Pattern wordDefinition)
public void update(List<org.eclipse.lsp4j.TextDocumentContentChangeEvent> changes)
changes
- the text document changes.Copyright © 2022. All rights reserved.