01: package org.drools.eclipse.editors.scanners;
02:
03: import org.eclipse.jface.text.rules.IWordDetector;
04:
05: public class RuleWordDetector implements IWordDetector {
06:
07: /* (non-Javadoc)
08: * Method declared on IWordDetector.
09: */
10: public boolean isWordPart(char character) {
11: return Character.isJavaIdentifierPart(character)
12: || character == '-';
13: }
14:
15: /* (non-Javadoc)
16: * Method declared on IWordDetector.
17: */
18: public boolean isWordStart(char character) {
19: return Character.isJavaIdentifierStart(character);
20: }
21: }
|