WIP: DocumentManager.getCurrentDocument() migration