void () { int index = myModel.getSelectedIndex(); if (index >= 0 && index < myModel.size() && allowNavItemsFocus()) { IdeFocusManager.getInstance(myProject).requestFocus(getItem(index), true); } else { IdeFocusManager.getInstance(myProject).requestFocus(this, true); } }