Class ITextRegionTransformer.Default
- java.lang.Object
-
- org.eclipse.xtext.ide.server.occurrences.ITextRegionTransformer.Default
-
- All Implemented Interfaces:
ITextRegionTransformer
- Enclosing interface:
- ITextRegionTransformer
public static final class ITextRegionTransformer.Default extends java.lang.Object implements ITextRegionTransformer
Default text region to document highlight transformation function. Works only withITextRegionWithLineInformationinstances.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.xtext.ide.server.occurrences.ITextRegionTransformer
ITextRegionTransformer.Default
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.lsp4j.DocumentHighlightapply(Document document, org.eclipse.xtext.util.ITextRegion region, org.eclipse.lsp4j.DocumentHighlightKind kind)Transforms thetext regionargument into adocument highlightinstance by calculating the proper position from the document.
-
-
-
Method Detail
-
apply
public org.eclipse.lsp4j.DocumentHighlight apply(Document document, org.eclipse.xtext.util.ITextRegion region, org.eclipse.lsp4j.DocumentHighlightKind kind)
Description copied from interface:ITextRegionTransformerTransforms thetext regionargument into adocument highlightinstance by calculating the proper position from the document. The given kind will be used to distinguish betweenread,writeand ordinarytextoccurrences.This conversion is required to transform the Xtext specific document relative offsets into language server specific line relative offsets.
- Specified by:
applyin interfaceITextRegionTransformer- Parameters:
document- the document that contains the text content. Cannot benull.region- the text region that has to be converted. Cannot benull.kind- the document highlight kind. Cannot benull.- Returns:
- with a new transformed
document highlightinstance.
-
-