@Override
public Configuration getProjectConfig(Project project)
{
ScopedConfigurationAdapter projectConfig = new ScopedConfigurationAdapter();
XMLConfiguration projectLocalConfig;
try
{
projectLocalConfig = new XMLConfiguration(getProjectSettings(project).getUnderlyingResourceObject());
projectLocalConfig.setEncoding("UTF-8");
}
catch (org.apache.commons.configuration.ConfigurationException e)
{
throw new ConfigurationException(e);
}
projectLocalConfig.setReloadingStrategy(new FileChangedReloadingStrategy());
projectLocalConfig.setAutoSave(true);
ConfigurationAdapter adapter = BeanManagerUtils.getContextualInstance(bm, ConfigurationAdapter.class,
new ConfigAdapterQualifierLiteral());
adapter.setParent(projectConfig);
adapter.setDelegate(projectLocalConfig);