String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templateWithBindingApplied = ""; try { Template t = packageTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); packageTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("packageDoc", packageDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templateWithBindingApplied = ""; try { Template t = docTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); docTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("rootDoc", rootDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("classDoc", classDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("classDoc", classDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = (String) classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = (Template) classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map binding = new HashMap(); binding.put("classDoc", classDoc); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templateWithBindingApplied = ""; try { Template t = docTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); docTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("rootDoc", rootDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templateWithBindingApplied = ""; try { Template t = docTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); docTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("rootDoc", rootDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templateWithBindingApplied = ""; try { Template t = packageTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); packageTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("packageDoc", packageDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templateWithBindingApplied = ""; try { Template t = docTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); docTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("rootDoc", rootDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templateWithBindingApplied = ""; try { Template t = packageTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); packageTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("packageDoc", packageDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templateWithBindingApplied = ""; try { Template t = packageTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); packageTemplates.put(template, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("packageDoc", packageDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templatePath = template; String templateWithBindingApplied = ""; try { Template t = (Template) docTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); docTemplates.put(templatePath, t); } Map binding = new HashMap(); binding.put("rootDoc", rootDoc); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("classDoc", classDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map<String, Object> binding = new HashMap<String, Object>(); binding.put("classDoc", classDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templatePath = template; String templateWithBindingApplied = ""; try { Template t = (Template) packageTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); packageTemplates.put(templatePath, t); } Map binding = new HashMap(); binding.put("packageDoc", packageDoc); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { e.printStackTrace(); } return templateWithBindingApplied; }
String applyRootDocTemplate(String template, GroovyRootDoc rootDoc) { String templateWithBindingApplied = ""; try { Template t = docTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); docTemplates.put(template, t); } Map<String, Object> binding = new LinkedHashMap<String, Object>(); binding.put("rootDoc", rootDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { System.out.println("Error processing root doc template"); e.printStackTrace(); } return templateWithBindingApplied; }
String applyPackageTemplate(String template, GroovyPackageDoc packageDoc) { String templateWithBindingApplied = ""; try { Template t = packageTemplates.get(template); if (t == null) { t = engine.createTemplate(resourceManager.getReader(template)); packageTemplates.put(template, t); } Map<String, Object> binding = new LinkedHashMap<String, Object>(); binding.put("packageDoc", packageDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).toString(); } catch (Exception e) { System.out.println("Error processing package template for: " + packageDoc.name()); e.printStackTrace(); } return templateWithBindingApplied; }
String applyClassTemplates(GroovyClassDoc classDoc) { String templatePath = classTemplatePaths.get(0); // todo (iterate) String templateWithBindingApplied = ""; try { Template t = classTemplates.get(templatePath); if (t == null) { t = engine.createTemplate(resourceManager.getReader(templatePath)); classTemplates.put(templatePath, t); } Map<String, Object> binding = new LinkedHashMap<String, Object>(); binding.put("classDoc", classDoc); binding.put("props", properties); templateWithBindingApplied = t.make(binding).writeTo(reasonableSizeWriter()).toString(); } catch (Exception e) { System.out.println("Error processing class template for: " + classDoc.getFullPathName()); e.printStackTrace(); } return templateWithBindingApplied; }