void () { final UsageViewContext context = createUsageViewContext(); final UsageViewPresentation presentation = new UsageViewPresentation(); presentation.setOpenInNewTab(FindSettings.getInstance().isShowResultsInSeparateView()); context.configure(presentation); myProcessPresentation = new FindUsagesProcessPresentation(presentation); myProcessPresentation.setShowNotFoundMessage(true); myProcessPresentation.setShowPanelIfOnlyOneUsage(true); PsiDocumentManager.getInstance(mySearchContext.getProject()).commitAllDocuments(); final ConfigurableUsageTarget target = context.getTarget(); ((FindManagerImpl)FindManager.getInstance(mySearchContext.getProject())).getFindUsagesManager().addToHistory(target); UsageViewManager.getInstance(mySearchContext.getProject()).searchAndShowUsages( new UsageTarget[]{target}, () -> processor -> findUsages(processor), myProcessPresentation, presentation, new UsageViewManager.UsageViewStateListener() { @Override public void usageViewCreated(@NotNull UsageView usageView) { context.setUsageView(usageView); context.configureActions(); } @Override public void findingUsagesFinished(final UsageView usageView) {} } ); }