@Override
    public void processInputMethodEvent(InputMethodEvent e) {
      mySearchField.processInputMethodEvent(e);
      if (e.isConsumed()) {
        updateLastPattern();
        String s = mySearchField.getText();
        updateSelection(findElement(s), s);
      }
    }
@Override
    public void processInputMethodEvent(InputMethodEvent e)