public class SemanticHighlighter extends java.lang.Object implements ISemanticHighlightingCalculator
Constructor and Description |
---|
SemanticHighlighter() |
Modifier and Type | Method and Description |
---|---|
protected TemplateBodyHighlighter |
getHighlighter(Grammar grammar) |
protected void |
highlightNode(INode node,
java.lang.String id,
IHighlightedPositionAcceptor acceptor)
Highlights the non-hidden parts of
node with the style that is associated with id . |
void |
provideHighlightingFor(XtextResource resource,
IHighlightedPositionAcceptor acceptor,
CancelIndicator cancelIndicator) |
public void provideHighlightingFor(XtextResource resource, IHighlightedPositionAcceptor acceptor, CancelIndicator cancelIndicator)
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
.cancelIndicator
- used to determine whether we should stop searching for highlighting positions
(use OperationCanceledManager
to check)protected TemplateBodyHighlighter getHighlighter(Grammar grammar)
protected void highlightNode(INode node, java.lang.String id, IHighlightedPositionAcceptor acceptor)
node
with the style that is associated with id
.