void () { //System.out.println("i = " + i); useAnnotatorsIn(JavaFileType.INSTANCE.getLanguage(), new MyRecordingAnnotator[]{new MyIncorrectlyRecursiveAnnotator()}, () -> { @Language("JAVA") String text1 = """ class X { int foo(Object param) { if (param == this) return 1; return 0; } } """; configureByText(JavaFileType.INSTANCE, text1); ((EditorImpl)myEditor).getScrollPane().getViewport().setSize(1000, 1000); @NotNull Editor editor = getEditor(); assertEquals(getFile().getTextRange(), editor.calculateVisibleRange()); assertEquals("XXX", assertOneElement(doHighlighting(HighlightSeverity.WARNING)).getDescription()); for (int i = 0; i < 100; i++) { //System.out.println("i = " + i); myDaemonCodeAnalyzer.restart(); List<HighlightInfo> infos = doHighlighting(HighlightSeverity.WARNING); assertEquals("XXX", assertOneElement(infos).getDescription()); } }); }