|
|
|
Re: manage syntax highlighting [message #894498 is a reply to message #894416] |
Mon, 09 July 2012 12:44 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
Take a look at
org.cloudsmith.geppetto.pp.dsl.ui.coloring.PPSemanticHighlightingCalculator
in repository cloudsmith/geppetto @ github for various ways to provide
highlighting. My implementation supports regular (token based), as well
as node based, textual based, and resource-properties based
highlighting. (Basically different ways to find an offset and a length
of text to highlight).
Hope that helps you.
- henrik
On 2012-09-07 9:33, frank fotso wrote:
> thks for the news , but i have searched the web for what you proposed
> but there was nothing interesting.
> my big problem is this :
> i have the following xtext grammar for example :
>
> MUX_CONFIG returns io::MUX_CONFIG:
> {io::MUX_CONFIG}
> 'MUX_CONFIG'
> '{'
> ('MultiplexedAddressLines' MultiplexedAddressLines=TypeBool)?
> ('AddressLineADD0' AddressLineADD0=EString)?
> ('AddressLineADD1' AddressLineADD1=EString)?
> ('AddressLineADD2' AddressLineADD2=EString)?
> ('MuxAdd0LSB' MuxAdd0LSB=TypeBool)?
> '}'
> and what i want is to give a specific color to the type element , that
> means for the type string i want that the walue enter and the element
> yes or no of the type bool have the same color but i also want that
> color to be different from the color of the word in quotes.
> that means , base on the above grammar , imagine you have the folor
> editor file:
>
> muxconfig MUX_CONFIG {
> MultiplexedAddressLines No
> AddressLineADD0 ggdjd
> AddressLineADD1 tgklgkl
> AddressLineADD2 jgdkd
> MuxAdd0LSB Yes
> }
>
> so i want the No , Yes and tthe differents names like ggdjd, tgklgk
> or jgdkd to have a specific color..
>
> any ideas on how to do it?
>
> Best regard,
> Frank
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05224 seconds