Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] IRule - MultiLineRule

Hi,

Got a small problem setting up a rule for a customized editor. (Using eclipse 3.0 btw)

Anyway, here is my code 

public MyRuleScanner() 
{
  IToken tagToken = new Token(new TextAttribute(TAG_COLOR));
  IToken commentToken = new Token(new TextAttribute(COMMENT_COLOR));

  IRule[] rules = new IRule[3];
  rules[0] = new SingleLineRule("<myTag", "myTag>", tagToken);		
  rules[1] = new EndOfLineRule("//", commentToken);
  rules[2] = new MultiLineRule("/*", "*/", commentToken);
  setRules(rules);
}

This works fine 
// Enters some text here
and 
/* This is a comment */
but how can I make rule for something like this
/* Here
is a comment
over
multiple line
*/

I thought the multiLineRule would cover it, but it doesn't. Thanks for any input.

Back to the top