code: private 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);
      }
docs: /*
  Determine how many lines have been changed,
  then apply highlighting to each line