public void doFindNext(JTextComponent target){
  if (target == null || pattern == null) {
    return;
  }
  SyntaxDocument sDoc=ActionUtils.getSyntaxDocument(target);
  if (sDoc == null) {
    return;
  }
  int start=target.getCaretPosition() + 1;
  if (start >= sDoc.getLength()) {
    start=0;
  }
  Matcher matcher=sDoc.getMatcher(pattern,start);
  if (matcher != null && matcher.find()) {
    target.select(matcher.start() + start,matcher.end() + start);
  }
 else {
    if (isWrap()) {
      matcher=sDoc.getMatcher(pattern);
      if (matcher != null && matcher.find()) {
        target.select(matcher.start(),matcher.end());
      }
 else {
        msgNotFound();
      }
    }
 else {
      msgNotFound();
    }
  }
}

public void doFindNext ( JTextComponent target ) { if ( target == null || pattern == null ) { return ; } SyntaxDocument sDoc = ActionUtils . getSyntaxDocument ( target ) ; if ( sDoc == null ) { return ; } int start = target . getCaretPosition ( ) + 1 ; if ( start >= sDoc . getLength ( ) ) { start = 0 ; } Matcher matcher = sDoc . getMatcher ( pattern , start ) ; if ( matcher != null && matcher . find ( ) ) { target . select ( matcher . start ( ) + start , matcher . end ( ) + start ) ; } else { if ( isWrap ( ) ) { matcher = sDoc . getMatcher ( pattern ) ; if ( matcher != null && matcher . find ( ) ) { target . select ( matcher . start ( ) , matcher . end ( ) ) ; } else { msgNotFound ( ) ; } } else { msgNotFound ( ) ; } } }
perform a findnext operation on the given text component . position the caret at the start of the next found pattern
