code: private void applyHighlighting( String content, int line ) throws BadLocationException
    {
      int startOffset = _root.getElement( line ).getStartOffset();
      int endOffset = _root.getElement( line ).getEndOffset() - 1;
      int lineLength = endOffset - startOffset;
      int contentLength = content.length();
      if( endOffset >= contentLength )
      {
        endOffset = contentLength - 1;
      }
      // check for multi line comments
      // (always set the comment attribute for the entire line)
      if( endingMultiLineComment( content, startOffset, endOffset ) || isMultiLineComment() || startingMultiLineComment( content, startOffset, endOffset ) )
      {
        setCharacterAttributes( startOffset, endOffset - startOffset + 1, _comment, false );
        return;
      }
      // set normal attributes for the line
      setCharacterAttributes( startOffset, lineLength, _word, true );
      // check for single line comment
      int index = content.indexOf( getSingleLineDelimiter(), startOffset );
      if( (index > -1) && (index < endOffset) )
      {
        setCharacterAttributes( index, endOffset - index + 1, _comment, false );
        endOffset = index - 1;
      }
      // check for tokens
      checkForTokens( content, startOffset, endOffset );
    }
docs: /*
  Parse the line to determine the appropriate highlighting