Many events fired in PsiTreeChangeListener on startup

Hi,

I have a question. I have a ProjectComponent which indexes things when a project is opened. Then, I use a PsiTreeChangeListener to make updates as the code is changed. However, when there's been a massive change in the git repository of the project, then on startup my listener receives many events corresponding to the changes made. How can I prevent it and be informed only on changes made inside the IDE?

1 comment

You can't. Note that indexing the entire project when it's opened is a sub-optimal implementation; a more efficient solution would be to use IntelliJ IDEA's indexing framework described in http://confluence.jetbrains.com/display/IDEADEV/Indexing+and+PSI+Stubs+in+IntelliJ+IDEA

0

Please sign in to leave a comment.