Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Syntax highlighting of prefixes
Syntax highlighting of prefixes [message #247867] Tue, 01 June 2004 08:28 Go to next message
Eclipse UserFriend
Originally posted by: pieter.west.NOSPAM.nl

I'm creating an editor with syntax highlighting. This proves not to be
that difficult accept for one part: I would like to be able to highlight
only a prefix of certain words. For example: is_bool
In this case I would like to highlight is_ or at least is_bool. However,
in stead of bool, any (sequence of) character(s) could be attached to the
prefix is_
How can I create a rul for this?
Re: Syntax highlighting of prefixes [message #248080 is a reply to message #247867] Tue, 01 June 2004 17:20 Go to previous message
Eclipse UserFriend
Originally posted by: strykeleader.hotmail.com

Admittedly, I have only just started learning this stuff, so I could be
wrong, but here's a possibility. You could try creating an IRule that, in
the evaluate, uses the scanner to read in characters until it reaches an
underscore, then checking if that word is a keyword, then return the proper
token type.

- Parhaum

"Pieter" <pieter@west.NOSPAM.nl> wrote in message
news:c9hsps$f6k$1@eclipse.org...
> I'm creating an editor with syntax highlighting. This proves not to be
> that difficult accept for one part: I would like to be able to highlight
> only a prefix of certain words. For example: is_bool
> In this case I would like to highlight is_ or at least is_bool. However,
> in stead of bool, any (sequence of) character(s) could be attached to the
> prefix is_
> How can I create a rul for this?
>
Previous Topic:Problem in using perspective extension - help needed
Next Topic:How to hide perspecive bar in RCP in M9
Goto Forum:
  


Current Time: Sun Nov 09 17:19:36 EST 2025

Powered by FUDForum. Page generated in 0.03371 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top