addAccessRules(projectAccessRules, c.getProject(), tmp);
} else if (isProjectContainer(c)) {
// No access rules please.
addAccessRules(projectAccessRules, c.getProject(), null);
} else if (c.getType() == TYPE.PROJECT) {
Manifest mf = null;
try {
mf = JarUtils.loadJarManifest(new FileInputStream(c.getFile()));
} catch (IOException e) {
logger.logError("Unable to generate access rules from bundle " + c.getFile(), e);
return;
}
Parameters exportPkgs = new Parameters(mf.getMainAttributes().getValue(new Name(Constants.EXPORT_PACKAGE)));
List<IAccessRule> tmp = new LinkedList<IAccessRule>();
for (String exportPkg : exportPkgs.keySet()) {
String pathStr = exportPkg.replace('.', '/') + "/*";
tmp.add(JavaCore.newAccessRule(new Path(pathStr), IAccessRule.K_ACCESSIBLE));
}