Search in sources :

Example 1 with CustomHDInsightTemplateItem

use of com.microsoft.azure.hdinsight.projects.template.CustomHDInsightTemplateItem in project azure-tools-for-java by Microsoft.

the class HDInsightProjectTemplatesFactory method createTemplates.

@NotNull
@Override
public ProjectTemplate[] createTemplates(@Nullable String var1, WizardContext var2) {
    ArrayList<HDInsightTemplateItem> templateItems = HDInsightTemplates.getTemplates();
    int templateCount = templateItems.size();
    List<CustomHDInsightTemplateItem> customHDInsightTemplateItems = TemplatesUtil.getCustomTemplate();
    ProjectTemplate[] projectTemplates = new ProjectTemplate[templateCount + customHDInsightTemplateItems.size()];
    for (int i = 0; i < templateCount; i++) {
        projectTemplates[i] = new HDInsightProjectTemplate(templateItems.get(i));
    }
    for (int i = templateCount; i < templateCount + customHDInsightTemplateItems.size(); ++i) {
        projectTemplates[i] = new CustomProjectTemplate(customHDInsightTemplateItems.get(i - templateCount));
    }
    return projectTemplates;
}
Also used : CustomHDInsightTemplateItem(com.microsoft.azure.hdinsight.projects.template.CustomHDInsightTemplateItem) CustomProjectTemplate(com.microsoft.azure.hdinsight.projects.template.CustomProjectTemplate) CustomHDInsightTemplateItem(com.microsoft.azure.hdinsight.projects.template.CustomHDInsightTemplateItem) ProjectTemplate(com.intellij.platform.ProjectTemplate) CustomProjectTemplate(com.microsoft.azure.hdinsight.projects.template.CustomProjectTemplate) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ProjectTemplate (com.intellij.platform.ProjectTemplate)1 CustomHDInsightTemplateItem (com.microsoft.azure.hdinsight.projects.template.CustomHDInsightTemplateItem)1 CustomProjectTemplate (com.microsoft.azure.hdinsight.projects.template.CustomProjectTemplate)1 NotNull (org.jetbrains.annotations.NotNull)1