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?

0
2 comments
Avatar
Permanently deleted user

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

0
Avatar
Permanently deleted user

I will do that, thanks.

Edit: done, http://www.jetbrains.net/jira/browse/IDEA-8828

0

Please sign in to leave a comment.