VDBTemplate data = Group.getEditingTemplateData(); if (data==null) {  data = new VDBTemplate(file.getName(), file.getAbsolutePath()); data.setPorts(new Hashtable()); data.setPortsV(new Vector()); data.setGroup(Group.getRoot());   Group.setEditingTemplateData(data); }
public void save(java.io.File file) throws IOException {/* if (drawingSurface.isTemplateMode()) { 	saveAsTemplate(file); 	return; }*/  Group.save(Group.getRoot(), file, false);  // if ok drawingSurface.setModified(false); SetWorkspaceFile cmd = (SetWorkspaceFile)CommandManager.getInstance().getCommand("SetFile"); cmd.setFile(file.getCanonicalPath()); cmd.execute();}