question: private static boolean isNewComment ( IDocument document , int commandOffset , String partitioning ) { try { int lineIndex = document . getLineOfOffset ( commandOffset ) + 1 ; if ( lineIndex >= document . getNumberOfLines ( ) ) { return true ; } IRegion line = document . getLineInformation ( lineIndex ) ; ITypedRegion partition = TextUtilities . getPartition ( document , partitioning , commandOffset , false ) ; int partitionEnd = partition . getOffset ( ) + partition . getLength ( ) ; if ( line . getOffset ( ) >= partitionEnd ) { return false ; } if ( document . getLength ( ) == partitionEnd ) { return true ; } String comment = document . get ( partition . getOffset ( ) , partition . getLength ( ) ) ; if ( comment . indexOf ( "/*" , 2 ) != - 1 ) { return true ; } return false ; } catch ( BadLocationException e ) { return false ; } }
target:  Guesses if the command operates within a newly created SQL multi-line comment or not. If in doubt, it will assume that the SQL multi-line comment is new.