void () { GlobalInspectionTool tool = new HighlightVisitorBasedInspection().setRunAnnotators(true); enableInspectionTool(tool); assertNotNull(HighlightDisplayKey.find(tool.getShortName())); configureFromFileText("foo.txt", "hello<caret>"); DisabledQuickFixAnnotator.FIX_ENABLED = true; assertEmpty(doHighlighting()); DaemonCodeAnalyzer.getInstance(getProject()).restart(); DisabledQuickFixAnnotator.FIX_ENABLED = false; DaemonRespondToChangesTest.useAnnotatorsIn(PlainTextLanguage.INSTANCE, new DaemonRespondToChangesTest.MyRecordingAnnotator[]{new DisabledQuickFixAnnotator()}, ()-> { assertOneElement(highlightErrors()); assertEmpty(CodeInsightTestFixtureImpl.getAvailableIntentions(getEditor(), getFile()) .stream() .filter(i -> IntentionActionDelegate.unwrap(i) instanceof EmptyIntentionAction) .toList()); // nothing, not even EmptyIntentionAction DaemonCodeAnalyzer.getInstance(getProject()).restart(); DisabledQuickFixAnnotator.FIX_ENABLED = true; assertNotEmpty(CodeInsightTestFixtureImpl.getAvailableIntentions(getEditor(), getFile())); // maybe a lot of CleanupIntentionAction, FixAllIntention etc }); }