コード例 #1
0
ファイル: template.py プロジェクト: pombredanne/paella-svn
 def __init__(self,
              conn,
              cfg,
              suite,
              trait,
              package,
              template,
              extracted=None):
     MyNotebook.__init__(self)
     self.conn = conn
     self.cmd = TraitTemplate(self.conn, suite)
     self.cfg = cfg
     self.trait = trait
     self._tmp_path = '/nowhere'
     self.template_path = '/nowhere'
     self.workspace = TemplateEnvironment(self.conn)
     self.template_view = TemplateEnvironment(self.conn)
     self.original_view = TemplateEnvironment(self.conn)
     self.set_suite(suite)
     self.workspace.set_trait(trait)
     self.template_view.set_trait(trait)
     self.original_view.set_trait(trait)
     self.template_view.editor.set_editable(False)
     self.original_view.editor.set_editable(False)
     self.append_page(self.workspace, 'workspace')
     self.append_page(self.template_view, 'template')
     self.append_page(self.original_view, 'original')
     self.extracted = extracted
     self.set_template(package, template)
コード例 #2
0
 def __init__(self, conn, suite, trait):
     MyNotebook.__init__(self)
     self.conn = conn
     self.suite = suite
     self.trait = trait
     self.script = TraitScript(self.conn, self.suite)
     self.script.set_trait(trait)
     self.menu = SimpleMenu()
     for row in self.script.scripts():
         name = row.script
         sfile = self.script.scriptfile(name)
         self.append_script(name, sfile.read())
         sfile.close()
コード例 #3
0
 def __init__(self, conn, cfg, suite, trait, package, template, extracted=None):
     MyNotebook.__init__(self)
     self.conn = conn
     self.cmd = TraitTemplate(self.conn, suite)
     self.cfg = cfg
     self.trait = trait
     self._tmp_path = '/nowhere'
     self.template_path = '/nowhere'
     self.workspace = TemplateEnvironment(self.conn)
     self.template_view = TemplateEnvironment(self.conn)
     self.original_view = TemplateEnvironment(self.conn)
     self.set_suite(suite)
     self.workspace.set_trait(trait)
     self.template_view.set_trait(trait)
     self.original_view.set_trait(trait)
     self.template_view.editor.set_editable(False)
     self.original_view.editor.set_editable(False)
     self.append_page(self.workspace, 'workspace')
     self.append_page(self.template_view, 'template')
     self.append_page(self.original_view, 'original')
     self.extracted = extracted
     self.set_template(package, template)