void (CompletionResult result, boolean selectReplacedText) { int pos = myPathTextField.getCaretPosition(); if (!result.variants.isEmpty() && selectReplacedText) { myPathTextField.setCaretPosition(myPathTextField.getText().length()); myPathTextField.moveCaretPosition(pos); } }