use of com.intellij.ide.fileTemplates.actions.AttributesDefaults in project intellij-community by JetBrains.
the class CreateSetupPyAction method getAttributesDefaults.
@Override
public AttributesDefaults getAttributesDefaults(DataContext dataContext) {
Project project = CommonDataKeys.PROJECT.getData(dataContext);
final AttributesDefaults defaults = new AttributesDefaults("setup.py").withFixedName(true);
if (project != null) {
defaults.add("Package_name", project.getName());
final PropertiesComponent properties = PropertiesComponent.getInstance();
defaults.add("Author", properties.getOrInit(AUTHOR_PROPERTY, SystemProperties.getUserName()));
defaults.add("Author_email", properties.getOrInit(EMAIL_PROPERTY, ""));
defaults.addPredefined("PackageList", getPackageList(dataContext));
defaults.addPredefined("PackageDirs", getPackageDirs(dataContext));
}
return defaults;
}
Aggregations