<s> package org . eclipse . jdt . internal . codeassist . select ; import org . eclipse . jdt . internal . compiler . parser . Scanner ; public class SelectionScanner extends Scanner { public char [ ] selectionIdentifier ; public int selectionStart , selectionEnd ; public SelectionScanner ( long sourceLevel ) { super ( false , false , false , sourceLevel , null , null , true ) ; } public char [ ] getCurrentIdentifierSource ( ) { if ( this . selectionIdentifier == null ) { if ( this . selectionStart == this . startPosition && this . selectionEnd == this . currentPosition - 1 ) { if ( this . withoutUnicodePtr != 0 ) { System . arraycopy ( this . withoutUnicodeBuffer , 1 , this . selectionIdentifier = new char [ this . withoutUnicodePtr ] , 0 , this . withoutUnicodePtr ) ; } else { int length = this . currentPosition - this . startPosition ; System . arraycopy ( this . source , this . startPosition , ( this . selectionIdentifier = new char [ length ] ) , 0 , length ) ; } return this . selectionIdentifier ; } } return super . getCurrentIdentifierSource ( ) ; } public int scanIdentifierOrKeyword ( ) { int id = super . scanIdentifierOrKeyword ( ) ; if ( id != TokenNameIdentifier && this . startPosition == this . selectionStart && this . currentPosition == this . selectionEnd + 1 ) { return TokenNameIdentifier ; } return id ; } } </s>