question: public void cancelAutoCompletion ( ) { if ( inCompletion ) { textField . setText ( textBefore ) ; textField . setCaretPosition ( caretPosBefore ) ; prevCompletion = null ; prevCompletionIndex = 0 ; inCompletion = false ; } }
target:  Cancels the current completion, which means the state of the text is returned to what it was before completion and the info popup is closed if necessary.