if (beansProject == null || projects.contains(beansProject.getProject())) {
return;
}
projects.add(beansProject.getProject());
IBeansModel model = BeansCorePlugin.getModel();
try {
for (IBeansConfig config : beansProject.getConfigs()) {
String projectPath = ModelUtils.getResourcePath(config.getElementParent());
if (projectPath != null) {
// Create the full qualified path of the config
// (with support for configs stored in JAR files)
// as long as its not the initiating project
String name = addProjectPath && (config instanceof BeansConfig) ? projectPath + "/" + config.getElementName() : config.getElementName();
if (!configSet.hasConfig(name)) {
configs.add(BeansConfigFactory.create(beansProject, name, Type.MANUAL, false));
}
}
}
// Recursively add configurations to project
for (IProject proj : beansProject.getProject().getProject().getReferencedProjects()) {
IBeansProject referencedProj = model.getProject(proj);
addConfigsFromReferencedProjects(referencedProj, configs, projects, true);
}
} catch (CoreException e) {
// We can't do anything here
}