List<ImportedPackage> packageImports = new ArrayList<ImportedPackage>();
for (String importedPackage : partial.getImportedPackages()) {
HeaderDeclaration match = findMostSpecificDeclaration(importTemplateDeclarations, importedPackage);
ImportedPackage packageImport = result.getImportPackage().addImportedPackage(importedPackage);
if (match != null) {
packageImport.getAttributes().putAll(match.getAttributes());
packageImport.setResolution(parseResolution(match));
}
packageImports.add(packageImport);
}
}