void (@NotNull BiConsumer<? super VirtualFile, ? super FileEditorManager> consumer) { for (Project project : ProjectManager.getInstance().getOpenProjects()) { FileEditorManager editorManager = FileEditorManager.getInstance(project); for (VirtualFile file : editorManager.getOpenFiles()) { if (file.isValid() && !file.isDirectory()) { consumer.accept(file, editorManager); } } } }