void (@NotNull DocumentEvent e) { Document document = e.getDocument(); if (!shouldProcess(document)) { return; } handleDocumentChanged(getUndoManager(null), document, e); ProjectManager projectManager = ProjectManager.getInstanceIfCreated(); if (projectManager != null) { for (Project project : projectManager.getOpenProjects()) { handleDocumentChanged(getUndoManager(project), document, e); } } Project lightEditProject = LightEditUtil.getProjectIfCreated(); if (lightEditProject != null) { handleDocumentChanged(getUndoManager(lightEditProject), document, e); } }