public void advance() {
    if (myLineBreak) {
      myLogicalLine++;
    }
    else if (isFoldRegion()) {
      myLogicalLine = myDocument.getLineNumber(getElementEndOffset());
    }
    if (myElementEndOffset < myIterationState.getEndOffset()) {
      myElementStartOffset = myElementEndOffset;
      setCharElement();
    }
    else {
      myIterationState.advance();
      setElementOffsets();
    }
  }
public void advance()