use of com.android.tools.idea.npw.ChooseTemplateStep.MetadataListItem in project android by JetBrains.
the class ImportSourceModulePath method createImportTemplateWithCustomName.
@NotNull
protected static MetadataListItem createImportTemplateWithCustomName(@NotNull final String importTemplateName, @Nullable final String description) {
// Now, we're going to add in two pointers to the same template
File moduleTemplate = new File(TemplateManager.getTemplateRootFolder(), FileUtil.join(Template.CATEGORY_PROJECTS, "ImportExistingProject"));
TemplateManager manager = TemplateManager.getInstance();
TemplateMetadata metadata = manager.getTemplateMetadata(moduleTemplate);
assert metadata != null;
return new MetadataListItem(moduleTemplate, metadata) {
@Override
public String toString() {
return importTemplateName;
}
@Nullable
@Override
public String getDescription() {
return description == null ? super.getDescription() : description;
}
};
}
Aggregations