plugins/c_ext/c_ext.py
changeset 656 c1792dfc8c7e
parent 651 cbeb769b0a56
child 658 94417ab25510
equal deleted inserted replaced
655:5becd66cca02 656:c1792dfc8c7e
    24           <xsd:attribute name="LDFLAGS" type="xsd:string" use="required"/>
    24           <xsd:attribute name="LDFLAGS" type="xsd:string" use="required"/>
    25         </xsd:complexType>
    25         </xsd:complexType>
    26       </xsd:element>
    26       </xsd:element>
    27     </xsd:schema>
    27     </xsd:schema>
    28     """
    28     """
       
    29     EditorType = CFileEditor
       
    30     
    29     def __init__(self):
    31     def __init__(self):
    30         filepath = self.CFileName()
    32         filepath = self.CFileName()
       
    33         
       
    34         self._View = None
    31         
    35         
    32         self.Buffering = False
    36         self.Buffering = False
    33         self.CFile = CFileClasses["CFile"]()
    37         self.CFile = CFileClasses["CFile"]()
    34         if os.path.isfile(filepath):
    38         if os.path.isfile(filepath):
    35             xmlfile = open(filepath, 'r')
    39             xmlfile = open(filepath, 'r')
   138         elif name == "Retrieve":
   142         elif name == "Retrieve":
   139             return self.CFile.retrieveFunction.gettext()
   143             return self.CFile.retrieveFunction.gettext()
   140         elif name == "Publish":
   144         elif name == "Publish":
   141             return self.CFile.publishFunction.gettext()
   145             return self.CFile.publishFunction.gettext()
   142         return ""
   146         return ""
   143     
       
   144     def _OpenView(self):
       
   145         app_frame = self.GetPlugRoot().AppFrame
       
   146         
       
   147         cfileeditor = CFileEditor(app_frame.TabsOpened, self, app_frame)
       
   148         
       
   149         app_frame.EditProjectElement(cfileeditor, self.GetFilename())
       
   150                 
   147                 
   151     PluginMethods = [
   148     PluginMethods = [
   152         {"bitmap" : os.path.join("images", "EditCfile"),
   149         {"bitmap" : os.path.join("images", "EditCfile"),
   153          "name" : _("Edit C File"), 
   150          "name" : _("Edit C File"), 
   154          "tooltip" : _("Edit C File"),
   151          "tooltip" : _("Edit C File"),
   265         cfile.close()
   262         cfile.close()
   266         
   263         
   267         matiec_flags = '"-I%s"'%os.path.abspath(self.GetPlugRoot().GetIECLibPath())
   264         matiec_flags = '"-I%s"'%os.path.abspath(self.GetPlugRoot().GetIECLibPath())
   268         
   265         
   269         return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_flags))],str(self.CExtension.getLDFLAGS()),True
   266         return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_flags))],str(self.CExtension.getLDFLAGS()),True
   270         
   267 
       
   268 
   271 #-------------------------------------------------------------------------------
   269 #-------------------------------------------------------------------------------
   272 #                      Current Buffering Management Functions
   270 #                      Current Buffering Management Functions
   273 #-------------------------------------------------------------------------------
   271 #-------------------------------------------------------------------------------
   274 
   272 
   275     """
   273     """