问题
I am writing spock tests in Groovy / Grails in Eclipse. These use key words such as setup:
the:
and when:
. I'd like to be able to add some syntax highlighting to these words. Is this possible?
Thanks.
回答1:
Please try the Spock Eclipse plugin: http://marketplace.eclipse.org/content/spock-plugin#.Uht-2Lw26KQ I think it will do what you require.
回答2:
XText looks really cool, with extensive documentation and support. Is it too complex for what you need?
Either that, or if you have knowledge and experience with Eclipse RCP, you could create your own text editor, and add the project to your IDE.
来源:https://stackoverflow.com/questions/18441156/highlighting-certains-words-in-eclipse