void () { mySearchField.putClientProperty(MATCHED_PROVIDER_PROPERTY, UNKNOWN_CONFIGURATION_ICON); setHandleMatchedConfiguration(); adjustMainListEmptyText(mySearchField); mySearchField.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { updateByModifierKeysEvent(e); } @Override public void keyReleased(KeyEvent e) { updateByModifierKeysEvent(e); } private void updateByModifierKeysEvent(@NotNull KeyEvent e) { String message; myShiftIsPressed = e.isShiftDown(); myAltIsPressed = e.isAltDown(); if (myShiftIsPressed && myAltIsPressed) { message = IdeBundle.message("run.anything.run.in.context.debug.title"); } else if (myShiftIsPressed) { message = IdeBundle.message("run.anything.run.debug.title"); } else if (myAltIsPressed) { message = IdeBundle.message("run.anything.run.in.context.title"); } else { message = IdeBundle.message("run.anything.run.anything.title"); } SHIFT_IS_PRESSED.set(myShiftIsPressed); ALT_IS_PRESSED.set(myAltIsPressed); myTextFieldTitle.setText(message); updateMatchedRunConfigurationStuff(); } }); initSearchField(); mySearchField.setColumns(SEARCH_FIELD_COLUMNS); }