vt.setInputComments(dbTemplate.getInputComments()); vt.setOutputComments(dbTemplate.getOutputComments());
public static void extractTemplates(DBDData dbd, DBData db, VDBData vdb){	Enumeration e;	DBTemplate dbTemplate;	e = db.getTemplates().elements();	while (e.hasMoreElements()) {		dbTemplate = (DBTemplate)(e.nextElement());				VDBTemplate vt = new VDBTemplate(dbTemplate.getId(), dbTemplate.getFileName());		vt.setDescription(dbTemplate.getDescription());				// generate vt.group / VDB data		Group root = Group.getRoot();			try		{					vt.setGroup(new Group(null));			vt.getGroup().setAbsoluteName("");					Group.setRoot(vt.getGroup());					VDBData vdbData = VDBData.generateVDBData(dbd, dbTemplate.getData());			DrawingSurface.applyVisualData(false, vt.getGroup(), dbTemplate.getData(), vdbData);			vt.getGroup().unconditionalValidateSubObjects(false);						vt.setInputs(generateTemplateIOFields(dbTemplate, dbTemplate.getInputs(), "input"));			vt.setOutputs(generateTemplateIOFields(dbTemplate, dbTemplate.getOutputs(), "output"));						vdb.addTemplate(vt);		}		catch (Exception ex)		{			Console.getInstance().println();			Console.getInstance().println("Exception caught while generating '"+dbTemplate.getId()+"' template.");			Console.getInstance().println(ex);			Console.getInstance().println();		}		finally		{			Group.setRoot(root); 		}	}}