void (@NotNull AnalysisScope scope) { //noinspection TestOnlyProblems if (ApplicationManager.getApplication().isUnitTestMode() && !TESTING_VIEW) return; ThreadingAssertions.assertEventDispatchThread(); long elapsed = System.currentTimeMillis() - myInspectionStartedTimestamp; runToolsSpan.end(); LOG.info("Code inspection finished. Took " + elapsed + " ms"); if (getProject().isDisposed()) return; InspectionResultsView oldView = myView; InspectionResultsView newView = oldView == null ? new InspectionResultsView(this, new InspectionRVContentProviderImpl()) : null; ReadAction .nonBlocking(() -> (oldView == null ? newView : oldView).hasProblems()) .finishOnUiThread(ModalityState.any(), hasProblems -> { if (!hasProblems) { showNoProblemsNotification(scope, newView); } else if (newView != null && !newView.isDisposed() && getCurrentScope() != null) { addView(newView); newView.update(); } if (myView != null) { myView.setUpdating(false); } }) .expireWith(getProject()) .submit(AppExecutorUtil.getAppExecutorService()); }