equal
deleted
inserted
replaced
455 "Initial Value" : "", |
455 "Initial Value" : "", |
456 "Option" : "", |
456 "Option" : "", |
457 "Documentation" : "", |
457 "Documentation" : "", |
458 "Edit" : True |
458 "Edit" : True |
459 } |
459 } |
460 |
460 |
461 if element_type in ["config", "resource"]: |
461 if element_type in ["config", "resource"]: |
462 self.DefaultTypes = {"All" : "Global"} |
462 self.DefaultTypes = {"All" : "Global"} |
463 else: |
463 else: |
464 self.DefaultTypes = {"All" : "Local", "Interface" : "Input", "Variables" : "Local"} |
464 self.DefaultTypes = {"All" : "Local", "Interface" : "Input", "Variables" : "Local"} |
465 |
465 |
501 c = wx.ALIGN_CENTER |
501 c = wx.ALIGN_CENTER |
502 |
502 |
503 # Num Name Class Type Init Option Doc |
503 # Num Name Class Type Init Option Doc |
504 self.ColSizes = [40, 80, 70, 80, 80, 100, 160] |
504 self.ColSizes = [40, 80, 70, 80, 80, 100, 160] |
505 self.ColAlignements = [c, l, l, l, l, l, l] |
505 self.ColAlignements = [c, l, l, l, l, l, l] |
506 |
506 |
|
507 self.ElementType = element_type |
|
508 self.BodyType = None |
|
509 |
507 for choice in self.FilterChoices: |
510 for choice in self.FilterChoices: |
508 self.ClassFilter.Append(_(choice)) |
511 self.ClassFilter.Append(_(choice)) |
509 |
512 |
510 reverse_transfer = {} |
513 reverse_transfer = {} |
511 for filter, choice in self.FilterChoiceTransfer.items(): |
514 for filter, choice in self.FilterChoiceTransfer.items(): |
606 def __del__(self): |
609 def __del__(self): |
607 self.RefreshHighlightsTimer.Stop() |
610 self.RefreshHighlightsTimer.Stop() |
608 |
611 |
609 def SetTagName(self, tagname): |
612 def SetTagName(self, tagname): |
610 self.TagName = tagname |
613 self.TagName = tagname |
|
614 self.BodyType = self.Controler.GetEditedElementBodyType(self.TagName) |
611 |
615 |
612 def GetTagName(self): |
616 def GetTagName(self): |
613 return self.TagName |
617 return self.TagName |
614 |
618 |
615 def IsFunctionBlockType(self, name): |
619 def IsFunctionBlockType(self, name): |
616 bodytype = self.Controler.GetEditedElementBodyType(self.TagName) |
620 if self.ElementType != "function" and self.BodyType in ["ST", "IL"]: |
617 pouname, poutype = self.Controler.GetEditedElementType(self.TagName) |
|
618 if poutype != "function" and bodytype in ["ST", "IL"]: |
|
619 return False |
621 return False |
620 else: |
622 else: |
621 return self.Controler.GetBlockType(name, debug=self.Debug) is not None |
623 return self.Controler.GetBlockType(name, debug=self.Debug) is not None |
622 |
624 |
623 def RefreshView(self): |
625 def RefreshView(self): |