UsageViewEx (UsageTarget @NotNull [] targets, Usage @NotNull [] usages, @NotNull UsageViewPresentation presentation, @Nullable Factory<? extends UsageSearcher> usageSearcherFactory) { for (UsageViewFactory factory : UsageViewFactory.EP_NAME.getExtensionList()) { UsageViewEx result = factory.createUsageView(targets, usages, presentation, usageSearcherFactory); if (result != null) { return result; } } UsageViewEx usageView = new UsageViewImpl(myProject, presentation, targets, usageSearcherFactory); if (usages.length != 0) { usageView.appendUsagesInBulk(Arrays.asList(usages)); ProgressManager.getInstance().run(new Task.Modal(myProject, UsageViewBundle.message("progress.title.waiting.for.usages"), false) { @Override public void run(@NotNull ProgressIndicator indicator) { usageView.waitForUpdateRequestsCompletion(); } }); } usageView.setSearchInProgress(false); return usageView; }