Eclipse keyword highlighting in in my own text editor

Posted by Torok Balint on Stack Overflow See other posts from Stack Overflow or by Torok Balint
Published on 2012-10-12T21:33:11Z Indexed on 2012/10/12 21:36 UTC
Read the original article Hit count: 114

I made a simple text editor in eclipse to which I added some simple WordRule based syntax highlighting to highlight the language keywords. The problem is that when a keyword is part of an identifier (eg. "import" is part of "extra_import"), then "import" is highlighted in "extra_import". How can I stop eclipse to highlight a a keyword if it is only a sub string of another string?

Anlther question; is there a regular expression based IRule?

What is the purpose of WhitespaceRule? White spaces are usually not highlighted.


© Stack Overflow or respective owner

Related posts about eclipse

Related posts about syntax-highlighting