PsiDirectory[] dirs = aPackage.getDirectories();
for (PsiDirectory dir : dirs) {
addClassesInDirectory(dir, includeSubpackages, array);
}
}
<BUG>private static void addClassesInDirectory(final PsiDirectory dir, final boolean includeSubdirs, final ArrayList<PsiClass> array) {
ApplicationManager.getApplication().runReadAction(new Runnable() {</BUG>
@Override
public void run() {
PsiClass[] classes = JavaDirectoryService.getInstance().getClasses(dir);

PsiDirectory[] dirs = aPackage.getDirectories();
for (PsiDirectory dir : dirs) {
addClassesInDirectory(dir, includeSubpackages, array);
}
}
private static void addClassesInDirectory(@NotNull final PsiDirectory dir,
final boolean includeSubdirs,
@NotNull final List<PsiClass> array) {
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
PsiClass[] classes = JavaDirectoryService.getInstance().getClasses(dir);
