|
Re: How to get a SemanticSyntaxHighlighter to run [message #1766350 is a reply to message #1766347] |
Tue, 20 June 2017 12:31 |
|
Hi
do you implement
org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator
or
org.eclipse.xtext.ide.editor.syntaxcoloring.ISemanticHighlightingCalculator
here is what xtend does
override Class<? extends ISemanticHighlightingCalculator> bindIdeSemanticHighlightingCalculator() {
return XtendHighlightingCalculator
}
and here what is done for the xtext editor itself
public Class<? extends ISemanticHighlightingCalculator> bindISemanticHighlightingCalculator() {
return SemanticHighlightingCalculator.class;
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Re: How to get a SemanticSyntaxHighlighter to run [message #1766365 is a reply to message #1766360] |
Tue, 20 June 2017 15:15 |
Mark Green Messages: 37 Registered: June 2017 |
Member |
|
|
Ah, ok, thanks!
One other question is that the default lexical highlighting doesn't seem to be working at all. In particular it doesn't highlight keywords or literals. Is there a clearer way to specify which tokens in the grammar correspond to which style? I can see there are some examples in the documentation but they seem to use "acceptDefault" which doesn't seem right since the default isn't working. The default attribute assigned seems to work if the token's "name" is quoted, and I'm not sure how that would happen (the token can be specifies as a string in quotes but that doesn't seem to be its name)
[Updated on: Tue, 20 June 2017 15:30] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06992 seconds