AutoTestWatcher (@NotNull Project project) { return new DelayedDocumentWatcher(project, getDelay(), this, (Predicate<? super VirtualFile>)file -> { if (ScratchUtil.isScratch(file)) { return false; } // Vladimir.Krivosheev - I don't know, why AutoTestManager checks it, but old behavior is preserved return FileEditorManager.getInstance(project).isFileOpen(file); }); }