SearchEverywhereContributor<Object> (@NotNull AnActionEvent initEvent) { Project project = initEvent.getProject(); Component contextComponent = initEvent.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT); Consumer<? super String> setter = str -> { SearchEverywhereManager manager = SearchEverywhereManager.getInstance(project); if (manager.isShown()) manager.getCurrentlyShownUI().getSearchField().setText(str); }; return new TopHitSEContributor(project, contextComponent, setter); }