Changeset 4204
- Timestamp:
- 06/19/07 23:22:24 (6 years ago)
- Location:
- WaveDev/trunk/WaveDev/wavedev
- Files:
-
- 4 modified
-
ComponentClass.py (modified) (2 diffs)
-
ComponentFrame.py (modified) (1 diff)
-
MainFrame.py (modified) (4 diffs)
-
importResource.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
WaveDev/trunk/WaveDev/wavedev/ComponentClass.py
r3348 r4204 24 24 # Component Class 25 25 class Component: 26 def __init__(self, name="",AC=False,type="resource", generate=True):26 def __init__(self, name="",AC=False,type="resource",description="",generate=True): 27 27 self.name = name # this refers to the instance name 28 28 self.baseName = name # this refers to the component that the instance is based on … … 41 41 self.xmlName = name #if imported from component library - this may change 42 42 self.properties = [] 43 self.description = description 43 44 44 45 def __getitem__(self,i): -
WaveDev/trunk/WaveDev/wavedev/ComponentFrame.py
r4143 r4204 380 380 381 381 self.compDescrBox.Clear() 382 # write description from spd file here:self.compDescrBox.WriteText(self.active_comp.description)382 self.compDescrBox.WriteText(self.active_comp.description) 383 383 384 384 if self.active_comp.type != 'resource': -
WaveDev/trunk/WaveDev/wavedev/MainFrame.py
r4148 r4204 271 271 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupAddMenu, 272 272 id=wxID_FRAME1RESOURCEBOXPOPUPADD) 273 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopup AddMenu,273 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupGetDescr, 274 274 id=wxID_FRAME1RESOURCEBOXPOPUPGETDESCR) 275 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopup AddMenu,275 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupGetDoxygenRefMan, 276 276 id=wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN) 277 277 self.Bind(wx.EVT_MENU, self.OnResourceBoxPopupAdddevMenu, … … 467 467 self.savePlatformPath = None 468 468 self.saveProjectPath = None 469 469 self.description = None 470 470 471 471 ################################################################################ … … 1565 1565 x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDNODE) 1566 1566 x.Enable(False) 1567 x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR)1568 x.Enable(False)1569 x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN)1570 x.Enable(False)1567 #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDESCR) 1568 #x.Enable(False) 1569 #x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPGETDOXYGENREFMAN) 1570 #x.Enable(False) 1571 1571 elif tmpRes.type == 'node': 1572 1572 x = self.resourceBoxPopup.FindItemById(wxID_FRAME1RESOURCEBOXPOPUPADDDEV) … … 1660 1660 self.resourceBox.Unselect() 1661 1661 event.Skip() 1662 1663 def OnResourceBoxPopupGetDescr(self, event): 1664 sn = self.resourceBox.GetSelection() 1665 tmpRes = self.resourceBox.GetPyData(sn) 1666 self.compDescrBox.Clear() 1667 self.compDescrBox.WriteText(tmpRes.name + ": " + tmpRes.description) 1668 1669 def OnResourceBoxPopupGetDoxygenRefMan(self, event): 1670 errorMsg(self,"Doxygen Ref Man not implemented yet") 1662 1671 1663 1672 def OnResourceBoxPopupAddnodeMenu(self, event): -
WaveDev/trunk/WaveDev/wavedev/importResource.py
r3036 r4204 48 48 return None 49 49 50 doc_spd = amara.parse(stripDoctype(spdPath)) 51 if not hasattr(doc_spd.softpkg.implementation, 'description'): 52 #errorMsg(parent,"No description found in " + spdPath) 53 Rdescription='Description unavailable' 54 else: 55 Rdescription=str(doc_spd.softpkg.implementation.description) 56 #errorMsg(parent,Rdescription) 57 50 58 #Instantiate a new component of the appropriate type 51 59 if doc_scd.softwarecomponent.componenttype == u'resource': 52 newComp = CC.Component(name=Rname,type='resource' )60 newComp = CC.Component(name=Rname,type='resource',description=Rdescription) 53 61 elif doc_scd.softwarecomponent.componenttype == u'executabledevice': 54 newComp = CC.Component(name=Rname,type='executabledevice' )62 newComp = CC.Component(name=Rname,type='executabledevice',description=Rdescription) 55 63 elif doc_scd.softwarecomponent.componenttype == u'loadabledevice': 56 newComp = CC.Component(name=Rname,type='loadabledevice' )64 newComp = CC.Component(name=Rname,type='loadabledevice',description=Rdescription) 57 65 elif doc_scd.softwarecomponent.componenttype == u'device': 58 newComp = CC.Component(name=Rname,type='device' )66 newComp = CC.Component(name=Rname,type='device',description=Rdescription) 59 67 else: 60 68 errorMsg(parent,"Can't identify resource type for: " + Rname)