public static void updateEditorSearch(@NotNull Project project, @NotNull JTextComponent searchTextComponent, @NotNull Editor editor) {
    String filter = searchTextComponent.getText();
    EditorSearchSession session = EditorSearchSession.get(editor);
    if (StringUtil.isEmpty(filter)) {
      if (session != null) {
        boolean focused = searchTextComponent.isFocusOwner();
        session.close();
        if (focused) {
          IdeFocusManager.getInstance(project).requestFocus(searchTextComponent, false);
        }
      }
      return;
    }
    if (session == null) {
      session = EditorSearchSession.start(editor, project);
      editor.getCaretModel().moveToOffset(0);
      session.searchForward();
    }
    session.setTextInField(filter);
  }
public static void updateEditorSearch(@NotNull Project project, @NotNull JTextComponent searchTextComponent, @NotNull Editor editor)