Community
Participate
Working Groups
WordRule is an easy to use class for identifying keywords and returning appropriate tokens for different words. However, it offers an all-or-nothing approach to case sensitivity; you define whether the rule is case sensitive or not; you can't mix. Nor can you use two instances of WordRule, one case sensitive and one not. Some languages (like Apache Pig) require this; in Pig, keywords and datatypes are case insensitive, but functions are case sensitive. I've made a backward-compatible change to WordRule for a Pig Eclipse plug in, and would be happy to put this patch back in the Eclipse text framework. You can see the version of WordRule I'm using here: https://code.google.com/p/pig-eclipse/source/browse/trunk/org.apache.pig.contrib.eclipse/src/org/apache/pig/contrib/eclipse/WordRule.java
A scanner can take many rules. Why can't you just add two rules, one with the case-sensitive words and another one? If you want to contribute please follow https://wiki.eclipse.org/JDT_UI/How_to_Contribute#Contributing_Code
Dani- You're right; this is my mistake. I tried using two WordRules, one for case sensitive words and one for case insensitive words. This didn't work because my first rule was returning my default token, and the 2nd rule wasn't being used for anything, and that's why I modified WordRule. I didn't understand from the API what I was doing wrong, but after your comment I looked at it again and realized what was going on. I'll close this bug, then. Thanks!