I'm trying to use the javascript editor with StorageEditorInput rather
than a file. When I open the editor, the initial contents are always
empty even when the contents of the StorageEditorInput is not empty.

After debugging I've concluded that the problem is in
CompilationUnitDocumentProvider.createFileInfo().