GlobalSearchScope.directoryScope
I have a PsiDirectory and I want to have all PsiClasses in that directory. I use:
psiSearchHelper.findAllClasses(
GlobalSearchScope.directoryScope(psiDirectory, true)
);
Somehow I get 16 results on directories that should have only 4.
It seems every Class is put into the results 4 times.
What am I doing wrong here?
Please sign in to leave a comment.
I remember that I've seen the same as well. Well, IIRC, each class was present in the list only twice, not 4 times. It looks like a bug to me, but since I needed a quick solution back then, I did just put the results into a HashSet before processing them.
Report the bug to JIRA and see what happens.
Sascha
I will do that, thanks.
Edit: done, http://www.jetbrains.net/jira/browse/IDEA-8828