Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [pde-dev] Problem using org.eclipse.jface.text.rules package

Hi!

>implements IWordDetector 

I think you can't use an IWordDetctor for this task. A word detectors task
is to recognize words. You defined the word detector to recognizes uppercase
latters and digits as word parts. Thus, it detects that lowercase letter
doesn't belong to the word anymore and the WordRule thinks that the word has
ended.

I sugest you to implement a more generic word detected which allows upper
AND lowercase characters and digits as word part and (mayby) only upercase
chars as word start.

Then you should implement your own uppercase word rule that scans the text
using the word detector and only returns a valid token if the word is
uppercase.

Cu, Gunnar


Back to the top