Exemplo n.º 1
0
 def SetField(self, field, value):
     """ Set the value of the attribute. Used in xrcbinder::BoundControl. """
     # Set the field value if different from the current one
     if getattr(self, field) != value:
         # set the attribute
         setattr(self, field, value)
         # notify the listeners
         self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 2
0
 def SetSuperSubCategory(self, super, sub):
     """ 
     Makes super a supercategory of sub. This information is used to be able to disable all Tests with a single
     click (since Tests will be a supercategory of each Test project).
     """
     if not self.GetSubCategoriesOf().has_key(super):
         self.GetSubCategoriesOf()[super] = OrderedSet.OrderedSet()
     self.GetSubCategoriesOf()[super].add(sub)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 3
0
 def SetField(self, field, value):
     # Set the field value if different from the current one
     if getattr(self.__data, field) != value:
         # set the attribute
         setattr(self.__data, field, value)
         # post-process
         if field == "_ContextData__configurationName" and self.__compiler != None:
             self.__compiler.SetConfigurationName(
                 self.GetConfigurationName())
         elif field == "_ContextData__instance":
             # reset the filter
             self.SetFilter([])
         # notify
         self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 4
0
    def AddRootFolder(self, newRootFolder):

        # Check that the new folder doesn't have the same structure than the old ones
        newRootFolderSubdirs = []
        excludedFolders = ["CVS", ".svn", "data", ".git"]
        csnUtility.GetDirs(newRootFolder, newRootFolderSubdirs,
                           excludedFolders)
        for oldRootFolder in self.__data.GetRootFolders():
            oldRootFolderSubdirs = []
            csnUtility.GetDirs(oldRootFolder, oldRootFolderSubdirs,
                               excludedFolders)
            for oldSubDir in oldRootFolderSubdirs:
                for newSubDir in newRootFolderSubdirs:
                    if newSubDir == oldSubDir:
                        message = "Error: The new folder (%s) cannot contain similar subfolders than an already set folder (%s): %s = %s" % (
                            newRootFolder, oldRootFolder, newSubDir, oldSubDir)
                        raise Exception(message)

        self.__data.GetRootFolders().append(newRootFolder)

        self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 5
0
 def AddThirdPartySrcAndBuildFolder(self, srcFolder="", buildFolder=""):
     self.__data._GetThirdPartySrcAndBuildFolders().append(
         [srcFolder, buildFolder])
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 6
0
 def RemoveFilter(self, filter):
     self.__data.GetFilter().remove(filter)
     self.__data.GetFilter().sort()
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 7
0
 def AddFilter(self, filter):
     self.__data.GetFilter().append(filter)
     self.__data.GetFilter().sort()
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 8
0
 def ResetFilter(self):
     self.__data.SetFilter([])
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 9
0
 def ExtendRootFolders(self, folders):
     self.__data.GetRootFolders().extend(folders)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 10
0
 def RemoveRootFolder(self, folder):
     self.__data.GetRootFolders().remove(folder)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 11
0
 def RemoveThirdPartySrcAndBuildFolderByIndex(self, index):
     folders = self.__data._GetThirdPartySrcAndBuildFolders()
     self.__data._SetThirdPartySrcAndBuildFolders(folders[0:index] +
                                                  folders[index + 1:])
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 12
0
 def MoveDownThirdPartySrcAndBuildFolder(self, index):
     folders = self.__data._GetThirdPartySrcAndBuildFolders()
     self.__data._SetThirdPartySrcAndBuildFolders(
         folders[0:index] + [folders[index + 1], folders[index]] +
         folders[index + 2:])
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 13
0
 def SetInstallFolder(self, value):
     self.__data.SetInstallFolde(value)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 14
0
 def SetBuildFolder(self, value):
     self.__data.SetBuildFolder(value)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 15
0
 def SetKdevelopProjectFolder(self, value):
     self.__data.SetKdevelopProjectFolder(value)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 16
0
 def SetIdePath(self, value):
     self.__data.SetIdePath(value)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 17
0
 def SetFilter(self, value):
     value.sort()
     self.__data.SetFilter(value)
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 18
0
 def SetInstance(self, value):
     self.__data.SetInstance(value)
     # reset the filter
     self.SetFilter([])
     self.__NotifyListeners(ChangeEvent(self))
Exemplo n.º 19
0
 def SetCsnakeFile(self, value):
     self.__data.SetCsnakeFile(value)
     self.__NotifyListeners(ChangeEvent(self))