void computeColumnSpans ( ) { for ( int index = 0 ; index < _generatedMappings ( ) . size ( ) ; ++ index ) { ParsedMapping mapping = _generatedMappings ( ) . get ( index ) ; // Mappings do not contain a field for the last generated columnt. We // can come up with an optimistic estimate, however, by assuming that // mappings are contiguous (i.e. given two consecutive mappings, the // first mapping ends where the second one starts). if ( index + 1 < _generatedMappings ( ) . size ( ) ) { ParsedMapping nextMapping = _generatedMappings ( ) . get ( index + 1 ) ; if ( mapping . generatedLine == nextMapping . generatedLine ) { mapping . lastGeneratedColumn = nextMapping . generatedColumn - 1 ; continue ; } } // The last mapping for each line spans the entire line. mapping . lastGeneratedColumn = Integer . MAX_VALUE ; } }
Compute the last column for each generated mapping . The last column is inclusive .