plugins/c_ext/c_ext.py
changeset 203 cb9901076a21
parent 199 aa5f43bafad4
child 361 331d698e1118
equal deleted inserted replaced
202:cd81a7a6e55c 203:cb9901076a21
   186         elif name == "Publish":
   186         elif name == "Publish":
   187             return self.CFile.publishFunction.gettext()
   187             return self.CFile.publishFunction.gettext()
   188         return ""
   188         return ""
   189     
   189     
   190     _View = None
   190     _View = None
   191     def _OpenView(self, logger):
   191     def _OpenView(self):
   192         if not self._View:
   192         if not self._View:
   193             def _onclose():
   193             def _onclose():
   194                 self._View = None
   194                 self._View = None
   195             def _onsave():
   195             def _onsave():
   196                 self.GetPlugRoot().SaveProject()
   196                 self.GetPlugRoot().SaveProject()
   220         xmlfile.close()
   220         xmlfile.close()
   221         
   221         
   222         self.CFileBuffer.CurrentSaved()
   222         self.CFileBuffer.CurrentSaved()
   223         return True
   223         return True
   224 
   224 
   225     def PlugGenerate_C(self, buildpath, locations, logger):
   225     def PlugGenerate_C(self, buildpath, locations):
   226         """
   226         """
   227         Generate C code
   227         Generate C code
   228         @param current_location: Tupple containing plugin IEC location : %I0.0.4.5 => (0,0,4,5)
   228         @param current_location: Tupple containing plugin IEC location : %I0.0.4.5 => (0,0,4,5)
   229         @param locations: List of complete variables locations \
   229         @param locations: List of complete variables locations \
   230             [{"IEC_TYPE" : the IEC type (i.e. "INT", "STRING", ...)
   230             [{"IEC_TYPE" : the IEC type (i.e. "INT", "STRING", ...)
   357 
   357 
   358 class RootClass:
   358 class RootClass:
   359 
   359 
   360     PlugChildsTypes = [("C_File",_Cfile, "C file")]
   360     PlugChildsTypes = [("C_File",_Cfile, "C file")]
   361     
   361     
   362     def PlugGenerate_C(self, buildpath, locations, logger):
   362     def PlugGenerate_C(self, buildpath, locations):
   363         return [],"",False
   363         return [],"",False
   364 
   364 
   365 
   365