ide/src/wombat/gui/text/SchemeDocument.java
private void highlightLinesAfter(String content, int line)
            throws BadLocationException {
        int offset = rootElement.getElement(line).getEndOffset();

        //  Start/End delimiter not found, nothing to do

        int startDelimiter = indexOf(content, "#|", offset);
        int endDelimiter = indexOf(content, "|#", offset);

        if (startDelimiter < 0)
            startDelimiter = content.length();

        if (endDelimiter < 0)
            endDelimiter = content.length();

        int delimiter = Math.min(startDelimiter, endDelimiter);

        if (delimiter < offset)
            return;

        // Start/End delimiter found, reapply highlighting

        int endLine = rootElement.getElementIndex(delimiter);

        for (int i = line + 1; i < endLine; i++) {
            Element branch = rootElement.getElement(i);
            Element leaf = doc.getCharacterElement(branch.getStartOffset());
            AttributeSet as = leaf.getAttributes();

            if (attributes.containsKey("comment"))
            	if (as.isEqual(attributes.get("comment")))
            		applyHighlighting(content, i);
        }
    }
/*
    *  Highlight lines to start or end delimiter
    */
Highlight lines to start or end delimiter
Highlight lines to start or end delimiter
private void highlightLinesAfter(String content, int line)
            throws BadLocationException {
        int offset = rootElement.getElement(line).getEndOffset();
        int startDelimiter = indexOf(content, "#|", offset);
        int endDelimiter = indexOf(content, "|#", offset);
        if (startDelimiter < 0)
            startDelimiter = content.length();
        if (endDelimiter < 0)
            endDelimiter = content.length();
        int delimiter = Math.min(startDelimiter, endDelimiter);
        if (delimiter < offset)
            return;
        int endLine = rootElement.getElementIndex(delimiter);
        for (int i = line + 1; i < endLine; i++) {
            Element branch = rootElement.getElement(i);
            Element leaf = doc.getCharacterElement(branch.getStartOffset());
            AttributeSet as = leaf.getAttributes();
            if (attributes.containsKey("comment"))
            	if (as.isEqual(attributes.get("comment")))
            		applyHighlighting(content, i);
        }
    }
private void highlightLinesAfter ( String content , int line ) throws BadLocationException { int offset = rootElement . getElement ( line ) . getEndOffset ( ) ; int startDelimiter = indexOf ( content , "#|" , offset ) ; int endDelimiter = indexOf ( content , "|#" , offset ) ; if ( startDelimiter < 0 ) startDelimiter = content . length ( ) ; if ( endDelimiter < 0 ) endDelimiter = content . length ( ) ; int delimiter = Math . min ( startDelimiter , endDelimiter ) ; if ( delimiter < offset ) return ; int endLine = rootElement . getElementIndex ( delimiter ) ; for ( int i = line + 1 ; i < endLine ; i ++ ) { Element branch = rootElement . getElement ( i ) ; Element leaf = doc . getCharacterElement ( branch . getStartOffset ( ) ) ; AttributeSet as = leaf . getAttributes ( ) ; if ( attributes . containsKey ( "comment" ) ) if ( as . isEqual ( attributes . get ( "comment" ) ) ) applyHighlighting ( content , i ) ; } }
Highlight lines to start or end delimiter
Highlight lines to start or end delimiter
//  Start/End delimiter not found, nothing to do // Start/End delimiter found, reapply highlighting