Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Custom MultiLineRules for partitioning document in editor
Custom MultiLineRules for partitioning document in editor [message #464585] Sun, 11 March 2007 21:34 Go to next message
Eclipse UserFriend
Originally posted by: arkaaito.users.sourceforge.net

Salutations, ...rcp!

I'm working on an editor for JML, which is a specification language for Java
code. As part of the editor, I need to separate out the JML (denoted by

/**@ jml goes here
*/

to apply the JML rule set to it. I'm trying to do this with a custom
JMLPartitionScanner extending RuleBasedPartitionScanner, which then adds a
MultiLineRule (with beginning string "/**@" and ending string "*/") using
setPredicateRules(...).

I've double checked that this rule should be assigning the correct tag when
matched and that I've added that tag and the JMLScanner I want to route JML
to in my custom SourceViewerConfiguration extension, but for some reason the
JML still isn't being decorated (with the color I assigned to the
JMLScanner's default token).

Are there any common pitfalls of using RuleBasedPartitionScanners that might
be causing this? Alternately, does anyone happen to have a pointer to a
good example editor which does this sort of thing correctly?

-A.s.
Re: Custom MultiLineRules for partitioning document in editor [message #464588 is a reply to message #464585] Sun, 11 March 2007 21:59 Go to previous message
Eclipse UserFriend
Originally posted by: arkaaito.users.sourceforge.net

Apparently I lied about my problem here. I've just discovered that it
actually recognizes a JML section and highlights it, but only if it's all on
one line. It also appears to recognize it *before* I put in the final
slash.

I'm really quite baffled - what am I missing here?

-A.s.
Previous Topic:FieldEditors in a view - GridLayout gets messed up
Next Topic:welcome page detached
Goto Forum:
  


Current Time: Sat Sep 14 09:58:18 GMT 2024

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

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

Back to the top