use of org.rstudio.studio.client.projects.model.ProjectTemplateRegistryProvider in project rstudio by rstudio.
the class NewDirectoryNavigationPage method createPages.
private static ArrayList<WizardPage<NewProjectInput, NewProjectResult>> createPages(SessionInfo sessionInfo) {
ArrayList<WizardPage<NewProjectInput, NewProjectResult>> pages = new ArrayList<WizardPage<NewProjectInput, NewProjectResult>>();
// add default RStudio dialogs
pages.add(new NewDirectoryPage());
pages.add(new NewPackagePage());
pages.add(new NewShinyAppPage());
// add user-defined project template dialogs
ProjectTemplateRegistryProvider registryProvider = RStudioGinjector.INSTANCE.getProjectTemplateRegistryProvider();
ProjectTemplateRegistry registry = registryProvider.getProjectTemplateRegistry();
for (String key : JsUtil.asIterable(registry.keys())) {
JsArray<ProjectTemplateDescription> descriptions = registry.get(key);
for (ProjectTemplateDescription description : JsUtil.asIterable(descriptions)) pages.add(new WizardProjectTemplatePage(description));
}
return pages;
}
Aggregations