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.

Markus

4 comments
Comment actions Permalink

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.

0
Comment actions Permalink

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

0
Comment actions Permalink

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

0
Comment actions Permalink

Thank you very much Dmitry.

0

Please sign in to leave a comment.