How to access psi and stub indices to initialize a project component

I'd like to initialize a project component state when project is opened, but this requires access to PSI and indices. If I try to do this in projectOpened(), I am getting "Assertion failed: Access to psi files should be performed only after startup activity". Is it possible to perform this after PSI is ready and indices are updated?

1 comment
Comment actions Permalink
registerPostStartupActivity seems to be the right choice

Please sign in to leave a comment.