Searching filesystem during project startup...

Hi all

What is the recommended way to search the content roots for files using the psi during project startup. The psi doesn't seem to be initialised during the 'projectOpened' calls and I receive errors when using the shortnamecache functionality.

Is there some other event I can hook up to here?

Thanks

Paul

2 comments
Comment actions Permalink

Hello Paul,

What is the recommended way to search the content roots for files
using the psi during project startup. The psi doesn't seem to be
initialised during the 'projectOpened' calls and I receive errors when
using the shortnamecache functionality.

Is there some other event I can hook up to here?


You should call StartupManager.runPostStartupActivity() from your projectOpened()
method, and perform the operations requiring the PSI from the Runnable passed
to this method.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


1
Comment actions Permalink

Ah got it!

Thanks :)

Paul

0

Please sign in to leave a comment.