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) |
int |
lineOffsetAt(int position) |
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
BadLocationExceptionpublic int offsetAt(org.eclipse.lsp4j.Position position)
throws BadLocationException
BadLocationExceptionpublic String lineText(int lineNumber) throws BadLocationException
BadLocationExceptionpublic int lineOffsetAt(int position)
throws BadLocationException
BadLocationExceptionpublic String lineDelimiter(int lineNumber) throws BadLocationException
BadLocationExceptionpublic 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.