equal
deleted
inserted
replaced
249 |
249 |
250 # Return project pou names |
250 # Return project pou names |
251 def GetProjectConfigNames(self, debug = False): |
251 def GetProjectConfigNames(self, debug = False): |
252 project = self.GetProject(debug) |
252 project = self.GetProject(debug) |
253 if project is not None: |
253 if project is not None: |
254 return [config.getName() for config in project.getconfigurations()] |
254 return [config.getname() for config in project.getconfigurations()] |
255 return [] |
255 return [] |
256 |
256 |
257 # Return project pou variables |
257 # Return project pou variables |
258 def GetProjectPouVariables(self, pou_name = None, debug = False): |
258 def GetProjectPouVariables(self, pou_name = None, debug = False): |
259 variables = [] |
259 variables = [] |
732 |
732 |
733 # Change the name of a configuration resource |
733 # Change the name of a configuration resource |
734 def ChangeConfigurationResourceName(self, config_name, old_name, new_name): |
734 def ChangeConfigurationResourceName(self, config_name, old_name, new_name): |
735 if self.Project is not None: |
735 if self.Project is not None: |
736 # Found the resource corresponding to old name and change its name to new name |
736 # Found the resource corresponding to old name and change its name to new name |
737 resource = self.Project.getconfigurationResource(config_name) |
737 resource = self.Project.getconfigurationResource(config_name, old_name) |
738 if resource is not None: |
738 if resource is not None: |
739 resource.setName(new_name) |
739 resource.setname(new_name) |
740 self.BufferProject() |
740 self.BufferProject() |
741 |
741 |
742 # Return the type of the pou given by its name |
742 # Return the type of the pou given by its name |
743 def GetPouType(self, name, debug = False): |
743 def GetPouType(self, name, debug = False): |
744 project = self.GetProject(debug) |
744 project = self.GetProject(debug) |