question: public void addLine ( String text ) throws BadLocationException { if ( text == null || text . length ( ) == 0 || text . equals ( "\n" ) ) { return ; } document . replace ( document . getLength ( ) , 0 , text ) ; }
target:  Contrary to addIncrement(String), this method does not verify that the input terminates with the newline separator. It is up to the caller to only provide valid input.