use of com.intellij.facet.ProjectFacetManager in project intellij-community by JetBrains.
the class BuildoutFacetConfigurator method configureProject.
@Override
public void configureProject(Project project, @NotNull VirtualFile baseDir, Ref<Module> moduleRef) {
final Module[] modules = ModuleManager.getInstance(project).getModules();
if (modules.length > 0) {
final Module module = modules[0];
if (BuildoutFacet.getInstance(module) == null) {
baseDir.refresh(false, false);
final VirtualFile runner = BuildoutFacet.getRunner(baseDir);
if (runner != null) {
// TODO parse buildout.cfg and find out the part to use for the default script
final File script = BuildoutFacet.findScript(null, "buildout", project.getBaseDir());
if (script != null) {
final ProjectFacetManager facetManager = ProjectFacetManager.getInstance(module.getProject());
final BuildoutFacetConfiguration config = facetManager.createDefaultConfiguration(BuildoutFacetType.getInstance());
config.setScriptName(script.getPath());
setupFacet(module, config);
}
}
}
}
}
Aggregations