if (!super.isValid(sourceModule, offset, requestor)) {
return false;
}
int classEnd = getCatchStart() + 5; // "catch"
TextSequence statementText = getStatementText();
statementText = statementText.subTextSequence(classEnd, statementText
.length());
int startPosition = 0;
for (; startPosition < statementText.length(); startPosition++) {
if (statementText.charAt(startPosition) == '(') {
break;
}
}
if (startPosition == statementText.length()) {
// the current position is before the '('
return false;
}
startPosition = PHPTextSequenceUtilities.readForwardSpaces(
statementText, startPosition + 1); // + 1 for the '('
int endPosition = PHPTextSequenceUtilities.readIdentifierEndIndex(
getPhpVersion(), statementText, startPosition, false);
// String className = statementText.subSequence(startPosition,
// endPosition).toString();
if (endPosition != statementText.length()) {
return false;
}
return true;
}