ide/src/wombat/gui/text/SchemeDocument.java
public void processChangedLines(int offset, int length) throws BadLocationException {
        String content = doc.getText(0, doc.getLength());

        //  The lines affected by the latest document update
        int startLine = rootElement.getElementIndex(offset);
        int endLine = rootElement.getElementIndex(offset + length);

        //  Make sure all comment lines prior to the start line are commented
        //  and determine if the start line is still in a multi line comment
        setMultiLineComment(commentLinesBefore(content, startLine));

        //  Do the actual highlighting
        for (int i = startLine; i <= endLine; i++)
            applyHighlighting(content, i);

        //  Resolve highlighting to the next end multi line delimiter
        if (isMultiLineComment())
            commentLinesAfter(content, endLine);
        else
            highlightLinesAfter(content, endLine);
    }
/*
    *  Determine how many lines have been changed,
    *  then apply highlighting to each line
    */
Determine how many lines have been changed,
then apply highlighting to each line
Determine how many lines have been changed then apply highlighting to each line
public void processChangedLines(int offset, int length) throws BadLocationException {
        String content = doc.getText(0, doc.getLength());
        int startLine = rootElement.getElementIndex(offset);
        int endLine = rootElement.getElementIndex(offset + length);
        setMultiLineComment(commentLinesBefore(content, startLine));
        for (int i = startLine; i <= endLine; i++)
            applyHighlighting(content, i);
        if (isMultiLineComment())
            commentLinesAfter(content, endLine);
        else
            highlightLinesAfter(content, endLine);
    }
public void processChangedLines ( int offset , int length ) throws BadLocationException { String content = doc . getText ( 0 , doc . getLength ( ) ) ; int startLine = rootElement . getElementIndex ( offset ) ; int endLine = rootElement . getElementIndex ( offset + length ) ; setMultiLineComment ( commentLinesBefore ( content , startLine ) ) ; for ( int i = startLine ; i <= endLine ; i ++ ) applyHighlighting ( content , i ) ; if ( isMultiLineComment ( ) ) commentLinesAfter ( content , endLine ) ; else highlightLinesAfter ( content , endLine ) ; }
Determine how many lines have been changed,
  then apply highlighting to each line
Determine how many lines have been changed then apply highlighting to each line
//  The lines affected by the latest document update //  Make sure all comment lines prior to the start line are commented //  and determine if the start line is still in a multi line comment //  Do the actual highlighting //  Resolve highlighting to the next end multi line delimiter