|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.text.rules.NumberRule
public class NumberRule
An implementation of IRule detecting a numerical value.
| Field Summary | |
|---|---|
protected int |
fColumn
The column constraint |
protected IToken |
fToken
The token to be returned when this rule is successful |
protected static int |
UNDEFINED
Internal setting for the un-initialized column constraint |
| Constructor Summary | |
|---|---|
NumberRule(IToken token)
Creates a rule which will return the specified token when a numerical sequence is detected. |
|
| Method Summary | |
|---|---|
IToken |
evaluate(ICharacterScanner scanner)
Evaluates the rule by examining the characters available from the provided character scanner. |
void |
setColumnConstraint(int column)
Sets a column constraint for this rule. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int UNDEFINED
protected IToken fToken
protected int fColumn
| Constructor Detail |
|---|
public NumberRule(IToken token)
token - the token to be returned| Method Detail |
|---|
public void setColumnConstraint(int column)
column - the column in which the pattern startspublic IToken evaluate(ICharacterScanner scanner)
IRuletrue when calling isUndefined,
if the text that the rule investigated does not match the rule's requirements
evaluate in interface IRulescanner - the character scanner to be used by this rule
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.