public class MergingHighlightedPositionAcceptor extends java.lang.Object implements IHighlightedPositionAcceptor, ISemanticHighlightingCalculator
Constructor and Description |
---|
MergingHighlightedPositionAcceptor(ISemanticHighlightingCalculator delegate) |
Modifier and Type | Method and Description |
---|---|
void |
addPosition(int offset,
int length,
java.lang.String... ids)
Associates a text range with a style.
|
java.util.List<LightweightPosition> |
getPositions() |
void |
mergePositions() |
void |
provideHighlightingFor(XtextResource resource,
IHighlightedPositionAcceptor acceptor) |
public MergingHighlightedPositionAcceptor(ISemanticHighlightingCalculator delegate)
public void addPosition(int offset, int length, java.lang.String... ids)
IHighlightedPositionAcceptor
addPosition
in interface IHighlightedPositionAcceptor
offset
- the offset of the range.length
- the length of the range.ids
- the ids of the highlighting style, that should be applied.public void provideHighlightingFor(XtextResource resource, IHighlightedPositionAcceptor acceptor)
provideHighlightingFor
in interface ISemanticHighlightingCalculator
resource
- the resource that will be highlighted. May be null
in some rare cases.acceptor
- used to announce the mapping from text-range to the style's id. The acceptor will never be null
.public void mergePositions()
public java.util.List<LightweightPosition> getPositions()