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

1
2 comments
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Ah got it!

Thanks :)

Paul

0

Please sign in to leave a comment.