Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] IPredicateRule - getSuccessToken

Hi all,

for my firm i construct an templateeditor. Now i got a question about IPredicateRule. A IPredicateRule implementation have to inform when a text-part is opend an when its closed, right?

So, please have a Look at this:
   public IToken evaluate(ICharacterScanner scanner)
   {
       int c = scanner.read();
       while(c!=-1)
       {
           if(c=='<')
               return tag_start_token;
           if(c=='>')
               return word_end_token;
           c=scanner.read();
       }
       return Token.EOF;
   }

The meaning is: the tag starts with an "<" and ends with an ">". But the highlighter just colorize the opening "<".



Back to the top