|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.rules.PatternRule | +--org.eclipse.jface.text.rules.SingleLineRule | +--org.eclipse.jface.text.rules.WordPatternRule
A specific single line rule which stipulates that the start and end sequence occur within a single word, as defined by a word detector.
IWordDetector
Field Summary | |
protected IWordDetector |
fDetector
The word detector used by this rule |
Fields inherited from class org.eclipse.jface.text.rules.PatternRule |
fBreaksOnEOL, fColumn, fEndSequence, fEscapeCharacter, fStartSequence, fToken, UNDEFINED |
Constructor Summary | |
WordPatternRule(IWordDetector detector,
String startSequence,
String endSequence,
IToken token)
Creates a rule for the given starting and ending word pattern which, if detected, will return the specified token. |
|
WordPatternRule(IWordDetector detector,
String startSequence,
String endSequence,
IToken token,
char escapeCharacter)
/** Creates a rule for the given starting and ending word pattern which, if detected, will return the specified token. |
Method Summary | |
protected boolean |
endSequenceDetected(ICharacterScanner scanner)
Returns whether the end sequence was detected. |
protected void |
unreadBuffer(ICharacterScanner scanner)
Returns the characters in the buffer to the scanner. |
Methods inherited from class org.eclipse.jface.text.rules.PatternRule |
doEvaluate, doEvaluate, evaluate, evaluate, getSuccessToken, sequenceDetected, setColumnConstraint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IWordDetector fDetector
Constructor Detail |
public WordPatternRule(IWordDetector detector, String startSequence, String endSequence, IToken token)
startSequence
- the start sequence of the word patternendSequence
- the end sequence of the word patterntoken
- the token to be returned on successpublic WordPatternRule(IWordDetector detector, String startSequence, String endSequence, IToken token, char escapeCharacter)
startSequence
- the start sequence of the word patternendSequence
- the end sequence of the word patterntoken
- the token to be returned on successescapeCharacter
- the escape characterMethod Detail |
protected boolean endSequenceDetected(ICharacterScanner scanner)
endSequenceDetected
in class PatternRule
scanner
- the scanner to be used
true
if the word ends on the given end sequenceprotected void unreadBuffer(ICharacterScanner scanner)
scanner
- the scanner to be used
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |