DocumentManager now emits openDocumentsChanged and activeDocumentChanged events; StateManager now listens to DocumentManager instance to manage Generator state