Why is ContentRevision.getContent() null?

Hi Community,

I tried to get the content from a ContetnRevision for comparison.

The problem is, if I call ContentRevision.getContent for the first time after a project is loaded, the content and the revision number are null.



We persist the names of changed files and the distribution of them between changelists, and we load the changes from the VCS asynchronously when the project is opened. You'll get null as the return value if you request the content before the background update of the changes view is complete.


That means I just have to wait a specific time before I use my plugin?


You can use ChangeListManager#addChangeListListener and wait for changeListUpdateDone() event.


Please sign in to leave a comment.