@ Override public void insertString ( int offset , String str , AttributeSet a ) throws BadLocationException { switch ( str ) { case "(" : str = addParenthesis ( ) ; break ; case "\n" : str = addWhiteSpace ( offset ) ; break ; case "\"" : str = addMatchingQuotationMark ( ) ; break ; case "{" : str = addMatchingBrace ( offset ) ; break ; } super . insertString ( offset , str , a ) ; processChangedLines ( offset , str . length ( ) ) ; }
Override to apply syntax highlighting after the document has been updated