boolean resume= (this.fPartitionOffset > -1 && this.fPartitionOffset < this.fOffset);
// Set the token offset according to whether we're in a partition or not.
this.fTokenOffset= resume ? this.fPartitionOffset : this.fOffset;
IPredicateRule rule;
IToken token;
// Run through all the rules looking for a match.
for (int i= 0; i < this.fRules.length; i++) {
rule= (IPredicateRule) this.fRules[i];
/*
* Get the success token for this rule so we can
* check if it matches the current content type.
*/
token = rule.getSuccessToken();
//System.out.println("Checking if content type - " + fContentType + " matches " + token.getData());
if (this.fContentType.equals(token.getData().toString())
|| this.fContentType.equals(token.getData().toString() + "_begin")
|| this.fContentType.equals(token.getData().toString() + "_end")
|| this.fContentType.equals(token.getData().toString() + "_attribs")) {
// The content type matches, so we want to run the resume on the rule.
token= rule.evaluate(this, resume);
if (!token.isUndefined()) {
this.fContentType= null;
return token;
}
}