|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.xbase.ui.highlighting.XbaseHighlightingCalculator
public class XbaseHighlightingCalculator
A base implementation of the semantic highlighting calculation.
Highlights references to Primitives
, e.g. void, int, boolean
and the identifier this
.
Constructor Summary | |
---|---|
XbaseHighlightingCalculator()
|
Method Summary | |
---|---|
protected void |
doProvideHighlightingFor(XtextResource resource,
IHighlightedPositionAcceptor acceptor)
Actual implementation of the semantic highlighting calculation. |
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 . |
protected void |
highlightSpecialIdentifiers(IHighlightedPositionAcceptor acceptor,
ICompositeNode root)
|
protected void |
highlightSpecialIdentifiers(ILeafNode leafNode,
IHighlightedPositionAcceptor acceptor,
TerminalRule idRule)
|
protected java.util.Map<java.lang.String,java.lang.String> |
initializeHighlightedIdentifiers()
Returns a mapping from identifier (e.g. |
void |
provideHighlightingFor(XtextResource resource,
IHighlightedPositionAcceptor acceptor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XbaseHighlightingCalculator()
Method Detail |
---|
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
.protected void doProvideHighlightingFor(XtextResource resource, IHighlightedPositionAcceptor acceptor)
Actual implementation of the semantic highlighting calculation. It is ensured, that the given
resource is not null
and refers to an initialized parse result.
Clients should override this method in order to perform custom highlighting.
resource
- a valid to-be-processed resource. Is never null
.acceptor
- the acceptor. Is never null
.protected void highlightSpecialIdentifiers(IHighlightedPositionAcceptor acceptor, ICompositeNode root)
protected void highlightSpecialIdentifiers(ILeafNode leafNode, IHighlightedPositionAcceptor acceptor, TerminalRule idRule)
protected java.util.Map<java.lang.String,java.lang.String> initializeHighlightedIdentifiers()
null
.
protected void highlightNode(INode node, java.lang.String id, IHighlightedPositionAcceptor acceptor)
node
with the style that is associated
with id
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |