Custom MultiLineRules for partitioning document in editor [message #464585] |
Sun, 11 March 2007 21:34 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.04266 seconds