final List<IErlModule> result = Lists.newArrayList();
for (final IPath dir : dirs) {
final IFolder folder = project.getFolder(dir);
final IErlElement element = model.findElement(folder, true);
if (element instanceof IErlFolder) {
final IErlFolder erlFolder = (IErlFolder) element;
erlFolder.open(null);
for (final IErlElement e : erlFolder
.getChildrenOfKind(ErlElementKind.MODULE)) {
if (e instanceof IErlModule) {
final IErlModule m = (IErlModule) e;
final boolean isModule = SourceKind.nameToModuleKind(m.getName()) != SourceKind.HRL;
if (isModule == getModules) {