for (GenPackage genPackage : genModel.getGenPackages()) {
genPackage.setBasePackage(getBasePackage(grammar));
if (getFileExtensions() != null && packs.contains(genPackage.getEcorePackage())) {
genPackage.setFileExtensions(getFileExtensions());
}
<BUG>}
genModel.getUsedGenPackages().addAll(usedGenPackages);</BUG>
resolveAll(rs);
try {
genModel.eResource().save(

for (GenPackage genPackage : genModel.getGenPackages()) {
genPackage.setBasePackage(getBasePackage(grammar));
if (getFileExtensions() != null && packs.contains(genPackage.getEcorePackage())) {
genPackage.setFileExtensions(getFileExtensions());
}
}
List<GenPackage> usedGenPackages = getGenPackagesForPackages(genModel, getReferencedEPackages(packs));
genModel.getUsedGenPackages().addAll(usedGenPackages);
resolveAll(rs);
try {
genModel.eResource().save(
