void (@NotNull FindModel findModel) { if (findModel.getDirectoryName() != null && FindInProjectUtil.getDirectory(findModel) == null) { return; } UsageViewManager manager = UsageViewManager.getInstance(myProject); if (manager == null) return; FindManager findManager = FindManager.getInstance(myProject); findManager.getFindInProjectModel().copyFrom(findModel); FindModel findModelCopy = findModel.clone(); UsageViewPresentation presentation = FindInProjectUtil.setupViewPresentation(findModelCopy); FindUsagesProcessPresentation processPresentation = FindInProjectUtil.setupProcessPresentation(presentation); ConfigurableUsageTarget usageTarget = new FindInProjectUtil.StringUsageTarget(myProject, findModel); ((FindManagerImpl)FindManager.getInstance(myProject)).getFindUsagesManager().addToHistory(usageTarget); manager.searchAndShowUsages(new UsageTarget[]{usageTarget}, () -> processor -> { myIsFindInProgress = true; try { Processor<UsageInfo> consumer = info -> { Usage usage = UsageInfo2UsageAdapter.CONVERTER.fun(info); usage.getPresentation().getIcon(); // cache icon return processor.process(usage); }; FindInProjectUtil.findUsages(findModelCopy, myProject, consumer, processPresentation); } finally { myIsFindInProgress = false; } }, processPresentation, presentation, null ); }