private @NotNull SearchTextField createSearchBox(JPanel root) {
    final SearchTextField field = new SearchTextField(getDimensionKey() + ".searchHistory");
    field.addDocumentListener(new DocumentAdapter() {
      @Override
      protected void textChanged(@NotNull DocumentEvent e) {
        if (myModel.myFilter() == null) {
          LocalHistoryCounter.INSTANCE.logFilterUsed(LocalHistoryCounter.Kind.Directory);
        }
        scheduleRevisionsUpdate(m -> {
          m.setFilter(field.getText());
          ApplicationManager.getApplication().invokeLater(() -> {
            if (!isDisposed()) {
              field.addCurrentTextToHistory();
            }
          });
        });
      }
    });
    DumbAwareAction.create(e -> field.requestFocusInWindow())
      .registerCustomShortcutSet(CommonShortcuts.getFind(), root, this);

    return field;
  }
private @NotNull SearchTextField createSearchBox(JPanel root)