void (@NotNull Project project, @NotNull PsiFile psiFile, @NotNull FindModel findModel) { findModel.setCustomScope(true); findModel.setProjectScope(false); findModel.setCustomScopeName(FindBundle.message("file.scope.name.0", psiFile.getName())); List<Usage> usages = findAll(project, psiFile, findModel); if (usages == null) return; final UsageTarget[] usageTargets = {new FindInProjectUtil.StringUsageTarget(project, findModel)}; final UsageViewPresentation usageViewPresentation = FindInProjectUtil.setupViewPresentation(false, findModel); UsageView view = UsageViewManager.getInstance(project).showUsages(usageTargets, usages.toArray(Usage.EMPTY_ARRAY), usageViewPresentation); view.setRerunAction(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { findAllAndShow(project, psiFile, findModel); } @Override public boolean isEnabled() { return !project.isDisposed() && psiFile.isValid(); } }); }