equal
deleted
inserted
replaced
824 |
824 |
825 def RemoveProjectVariableByFilter(self, leading): |
825 def RemoveProjectVariableByFilter(self, leading): |
826 self.Project.removeVariableByFilter(leading) |
826 self.Project.removeVariableByFilter(leading) |
827 self.BufferProject() |
827 self.BufferProject() |
828 |
828 |
|
829 def AddProjectDefaultConfiguration(self, config_name="config", res_name="resource1"): |
|
830 ProjectController.AddProjectDefaultConfiguration(self, config_name, res_name) |
|
831 |
|
832 self.SetEditedResourceInfos( |
|
833 self.ComputeConfigurationResourceName(config_name, res_name), |
|
834 [{"Name": "main_task", |
|
835 "Triggering": "Cyclic", |
|
836 "Interval": "T#50ms", |
|
837 "Priority": 0}], |
|
838 []) |
|
839 |
829 def LoadProject(self, ProjectPath, BuildPath=None): |
840 def LoadProject(self, ProjectPath, BuildPath=None): |
830 """ |
841 """ |
831 Load a project contained in a folder |
842 Load a project contained in a folder |
832 @param ProjectPath: path of the project folder |
843 @param ProjectPath: path of the project folder |
833 """ |
844 """ |
846 "productName": "", |
857 "productName": "", |
847 "productVersion": "", |
858 "productVersion": "", |
848 "projectName": "", |
859 "projectName": "", |
849 "pageSize": (0, 0), |
860 "pageSize": (0, 0), |
850 "scaling": {}}) |
861 "scaling": {}}) |
|
862 if len(self.GetProjectConfigNames()) == 0: |
|
863 self.AddProjectDefaultConfiguration() |
851 |
864 |
852 # Change XSD into class members |
865 # Change XSD into class members |
853 self._AddParamsMembers() |
866 self._AddParamsMembers() |
854 self.Children = {} |
867 self.Children = {} |
855 |
868 |
1875 frame.Raise() |
1888 frame.Raise() |
1876 |
1889 |
1877 def Refresh(self): |
1890 def Refresh(self): |
1878 global frame |
1891 global frame |
1879 if frame is not None: |
1892 if frame is not None: |
1880 frame._Refresh(TITLE, POUINSTANCEVARIABLESPANEL, FILEMENU, EDITMENU) |
1893 frame._Refresh(TITLE, PROJECTTREE, POUINSTANCEVARIABLESPANEL, FILEMENU, EDITMENU) |
1881 frame.RefreshEditor() |
1894 frame.RefreshEditor() |
1882 frame.RefreshAll() |
1895 frame.RefreshAll() |
1883 |
1896 |
1884 def Close(self): |
1897 def Close(self): |
1885 global frame |
1898 global frame |