// JW: logic still needs cleanup...
if (pattern.pattern().equals(lastRegEx)) {
return false;
}
int length = getDocument().getLength() - start;
Segment segment = new Segment();
try {
getDocument().getText(start, length, segment);
} catch (BadLocationException ex) {
LOG.log(Level.FINE,
"this should not happen (calculated the valid start/length) " , ex);
}
Matcher matcher = pattern.matcher(segment.toString());
MatchResult currentResult = getMatchResult(matcher, true);
if (currentResult != null) {
// JW: how to compare match results reliably?
// the group().equals probably isn't the best idea...
// better check pattern?