void (KeyEvent e) { char keyChar = e.getKeyChar(); if (KeyboardUtils.isEnterKey(keyChar)) { handleClassSelection(myTable.getSelectedClass()); } else if (KeyboardUtils.isPartOfJavaClassName(keyChar) || KeyboardUtils.isBackSpace(keyChar)) { final String text = myFilterTextField.getText(); final String newText = KeyboardUtils.isBackSpace(keyChar) ? text.substring(0, text.length() - 1) : text + keyChar; myFilterTextField.setText(newText); IdeFocusManager.getInstance(myProject).requestFocus(myFilterTextField, false); } }