void (@NotNull DocumentEvent e) { if (ApplicationManager.getApplication().isUnitTestMode() || !Registry.is("compiler.document.save.enabled", false)) { return; } Document document = e.getDocument(); if (!FileDocumentManager.getInstance().isDocumentUnsaved(document)) { return; } VirtualFile file = FileDocumentManager.getInstance().getFile(document); if (file != null && file.isInLocalFileSystem()) { getInstance().scheduleProjectSave(); } }