void (UsageView usageView) { if (usageView instanceof UsageViewImpl) { ProgressManager.getInstance().run(new Task.Modal(getProject(), "Waiting", false) { @Override public void run(@NotNull ProgressIndicator indicator) { ((UsageViewImpl)usageView).waitForUpdateRequestsCompletion(); ((UsageViewImpl)usageView).drainQueuedUsageNodes(); ((UsageViewImpl)usageView).searchFinished(); } }); } }