if(currentResource instanceof IProject) {
// A project to be exported as a whole
for(File moduleRoot : forge.findModuleRoots(currentResource.getLocation().toFile(), defaultFilter)) {
if(isValidModule(moduleRoot, defaultFilter))
exportSpecs.add(new ExportSpec(moduleRoot, defaultFilter));
}
continue;
}
resourcesPerProject.put(currentResource.getProject(), currentResource);
}
for(IProject project : resourcesPerProject.keySet()) {
FileFilter filter = new ResourceFileFilter(resourcesPerProject.get(project), defaultFilter);
for(File moduleRoot : forge.findModuleRoots(project.getLocation().toFile(), filter))
if(isValidModule(moduleRoot, filter))
exportSpecs.add(new ExportSpec(moduleRoot, filter));
continue;
}
return exportSpecs;
}