513 self.DefaultTypes = {"All": "Global"} |
513 self.DefaultTypes = {"All": "Global"} |
514 else: |
514 else: |
515 self.DefaultTypes = {"All": "Local", "Interface": "Input", "Variables": "Local"} |
515 self.DefaultTypes = {"All": "Local", "Interface": "Input", "Variables": "Local"} |
516 |
516 |
517 if element_type in ["config", "resource"] \ |
517 if element_type in ["config", "resource"] \ |
518 or element_type in ["program", "transition", "action"]: |
518 or element_type in ["program", "transition", "action"]: |
519 # this is an element that can have located variables |
519 # this is an element that can have located variables |
520 self.Table = VariableTable(self, [], GetVariableTableColnames(True)) |
520 self.Table = VariableTable(self, [], GetVariableTableColnames(True)) |
521 |
521 |
522 if element_type in ["config", "resource"]: |
522 if element_type in ["config", "resource"]: |
523 self.FilterChoices = ["All", "Global"] # ,"Access"] |
523 self.FilterChoices = ["All", "Global"] # ,"Access"] |
870 def BuildProjectTypesMenu(self, type_menu, classtype): |
870 def BuildProjectTypesMenu(self, type_menu, classtype): |
871 # build a submenu containing function block types |
871 # build a submenu containing function block types |
872 bodytype = self.Controler.GetEditedElementBodyType(self.TagName) |
872 bodytype = self.Controler.GetEditedElementBodyType(self.TagName) |
873 pouname, poutype = self.Controler.GetEditedElementType(self.TagName) |
873 pouname, poutype = self.Controler.GetEditedElementType(self.TagName) |
874 if classtype in ["Input", "Output", "InOut", "External", "Global"] or \ |
874 if classtype in ["Input", "Output", "InOut", "External", "Global"] or \ |
875 poutype != "function" and bodytype in ["ST", "IL"]: |
875 poutype != "function" and bodytype in ["ST", "IL"]: |
876 functionblock_menu = wx.Menu(title='') |
876 functionblock_menu = wx.Menu(title='') |
877 fbtypes = self.Controler.GetFunctionBlockTypes(self.TagName) |
877 fbtypes = self.Controler.GetFunctionBlockTypes(self.TagName) |
878 for functionblock_type in fbtypes: |
878 for functionblock_type in fbtypes: |
879 new_id = wx.NewId() |
879 new_id = wx.NewId() |
880 functionblock_menu.Append(help='', id=new_id, kind=wx.ITEM_NORMAL, text=functionblock_type) |
880 functionblock_menu.Append(help='', id=new_id, kind=wx.ITEM_NORMAL, text=functionblock_type) |