use of com.android.tools.idea.templates.Parameter in project android by JetBrains.
the class NewFormFactorModulePath method renderActivity.
private boolean renderActivity(boolean dryRun, Map<String, Object> templateState, File projectRoot, File moduleRoot) {
TemplateEntry templateEntry = myState.get(KEY_SELECTED_TEMPLATE);
if (templateEntry == null) {
return true;
}
Template activityTemplate = templateEntry.getTemplate();
for (Parameter parameter : templateEntry.getMetadata().getParameters()) {
templateState.put(parameter.id, myState.get(myParameterStep.getParameterKey(parameter)));
}
RenderingContext activityContext = RenderingContext.Builder.newContext(activityTemplate, myWizard.getProject()).withCommandName("New Module").withDryRun(dryRun).withShowErrors(true).withOutputRoot(projectRoot).withModuleRoot(moduleRoot).withParams(templateState).withGradleSync(myGradleSyncIfNecessary).intoTargetFiles(myState.get(TARGET_FILES_KEY)).intoOpenFiles(myState.get(FILES_TO_OPEN_KEY)).intoDependencies(myState.get(DEPENDENCIES_KEY)).build();
return activityTemplate.render(activityContext);
}
Aggregations