Update of /cvsroot/modeling/ZModeling/ZModelizationTool
In directory sc8-pr-cvs1:/tmp/cvs-serv4596/ZModelizationTool
Modified Files:
ZModelizationTool.py
Log Message:
Updated the ZModeler: now includes the "base" mode for python
code. Plus it also introduces the 'dry-run' mode (show what would be
generated/overwritten without making any changes on the filesystem).
Index: ZModelizationTool.py
===================================================================
RCS file: /cvsroot/modeling/ZModeling/ZModelizationTool/ZModelizationTool.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ZModelizationTool.py 22 Apr 2003 09:35:16 -0000 1.12
--- ZModelizationTool.py 27 May 2003 19:49:17 -0000 1.13
***************
*** 715,720 ****
return self.manage_entityProperties(REQUEST, manage_tabs_message="Relationship's properties changed")
! def manage_build(self, modelName, rootPath=None, typeOfCode='python',
! REQUEST=None):
"Builds the python-code templates for the supplied model"
if not rootPath:
--- 715,720 ----
return self.manage_entityProperties(REQUEST, manage_tabs_message="Relationship's properties changed")
! def manage_build(self, modelName, rootPath=None, generation_scheme='compact',
! fake_mode=0, REQUEST=None):
"Builds the python-code templates for the supplied model"
if not rootPath:
***************
*** 724,737 ****
message=msg,
action="./manage_modelProperties")
!
! if typeOfCode=='python':
! from Modeling.ModelMasons.PyModelMason import PyModelMason
! mason = PyModelMason(self.modelNamed(modelName), rootPath)
mason.build()
if REQUEST is not None:
! return self.manage_modelProperties(
! REQUEST,
! manage_tabs_message='Building of code finished.',
! modelName=modelName)
def __call__(self):
--- 724,748 ----
message=msg,
action="./manage_modelProperties")
!
! from Modeling.ModelMasons.PyModelMason import PyModelMason
! mason = PyModelMason(self.modelNamed(modelName), rootPath,
! verbose_mode=1, generation_scheme=generation_scheme,
! fake_mode=fake_mode)
! from cStringIO import StringIO
! s=StringIO()
! mason.log=s.write
mason.build()
+
+ #msg=s.getvalue()
+ msg='<input type="hidden" name="modelName" value="%s">'%modelName
+ msg+='<table width="100%">'
+ if fake_mode:
+ msg+='<tr><td><b><u>Dry-run:</u> files have not been generated</b></i></td></tr>'
+ msg+='<tr><td align=left><pre>'+s.getvalue()
+ msg+='</pre></td></tr></table>'
+
if REQUEST is not None:
! return MessageDialog(title='Python code generation', message=msg,
! action="./manage_modelProperties")
def __call__(self):
|