void (@Nullable RefEntity refElement, boolean filterSuppressed, CommonProblemDescriptor @NotNull ... descriptors) { super.addProblemElement(refElement, filterSuppressed, descriptors); GlobalInspectionContextImpl context = getContext(); if (context.isViewClosed() || !(refElement instanceof RefElement)) { return; } if (myToolWrapper instanceof LocalInspectionToolWrapper && (!ApplicationManager.getApplication().isUnitTestMode() || GlobalInspectionContextImpl.TESTING_VIEW)) { context.initializeViewIfNeeded().doWhenDone(() -> context.getView().addProblemDescriptors(myToolWrapper, refElement, descriptors)); } }