src/eric7/Project/Project.py

branch
server
changeset 10704
27d21e5163b8
parent 10651
280a53840aa3
parent 10692
9becf9ca115c
child 10719
34901362f648
equal deleted inserted replaced
10680:306373ccf8fd 10704:27d21e5163b8
6274 if filetype == "__IGNORE__" 6274 if filetype == "__IGNORE__"
6275 ] 6275 ]
6276 6276
6277 dirs = [""] if recursiveSearch else self.subdirs[:] + [""] 6277 dirs = [""] if recursiveSearch else self.subdirs[:] + [""]
6278 for directory in dirs: 6278 for directory in dirs:
6279 skip = False 6279 if any(
6280 for ignore_pattern in ignore_patterns: 6280 fnmatch.fnmatch(directory, ignore_pattern)
6281 if fnmatch.fnmatch(directory, ignore_pattern): 6281 for ignore_pattern in ignore_patterns
6282 skip = True 6282 ):
6283 break
6284 if skip:
6285 continue 6283 continue
6286 6284
6287 curpath = ( 6285 curpath = (
6288 self.__remotefsInterface.join(self.ppath, directory) 6286 self.__remotefsInterface.join(self.ppath, directory)
6289 if isRemote 6287 if isRemote
6339 bfn = ( 6337 bfn = (
6340 self.__remotefsInterface.basename(fn) 6338 self.__remotefsInterface.basename(fn)
6341 if isRemote 6339 if isRemote
6342 else os.path.basename(fn) 6340 else os.path.basename(fn)
6343 ) 6341 )
6344 for pattern in sorted(self.__pdata["FILETYPES"], reverse=True): 6342
6343 # check against ignore patterns first (see issue 553)
6344 if any(
6345 fnmatch.fnmatch(bfn, ignore_pattern)
6346 for ignore_pattern in ignore_patterns
6347 ):
6348 continue
6349
6350 for pattern in self.__pdata["FILETYPES"]:
6345 if fnmatch.fnmatch(bfn, pattern): 6351 if fnmatch.fnmatch(bfn, pattern):
6346 filetype = self.__pdata["FILETYPES"][pattern] 6352 filetype = self.__pdata["FILETYPES"][pattern]
6347 break 6353 break
6348 6354
6349 if ( 6355 if (
6350 filetype in self.getFileCategories() 6356 filetype in self.getFileCategories()
6351 and fn not in self.__pdata[filetype] 6357 and (
6358 fn not in self.__pdata[filetype]
6359 and (
6360 filetype == "OTHERS"
6361 and os.path.dirname(fn) not in self.__pdata["OTHERS"]
6362 )
6363 )
6352 and ( 6364 and (
6353 filetype != "TRANSLATIONS" 6365 filetype != "TRANSLATIONS"
6354 or ( 6366 or (
6355 filetype == "TRANSLATIONS" 6367 filetype == "TRANSLATIONS"
6356 and ( 6368 and (
7354 (execute or question). 7366 (execute or question).
7355 """ 7367 """
7356 if Preferences.getProject( 7368 if Preferences.getProject(
7357 "AutoExecuteMake" 7369 "AutoExecuteMake"
7358 ) and not FileSystemUtilities.isRemoteFileName(self.ppath): 7370 ) and not FileSystemUtilities.isRemoteFileName(self.ppath):
7359 self.__executeMake( 7371 self.__executeMake(questionOnly=self.__pdata["MAKEPARAMS"]["MakeTestOnly"])
7360 questionOnly=self.__pdata["MAKEPARAMS"]["MakeTestOnly"],
7361 interactive=False,
7362 )
7363 7372
7364 @pyqtSlot() 7373 @pyqtSlot()
7365 def __executeMake(self, questionOnly=False, interactive=True): 7374 def __executeMake(self, questionOnly=False):
7366 """ 7375 """
7367 Private method to execute a project specific make run. 7376 Private method to execute a project specific make run.
7368 7377
7369 @param questionOnly flag indicating to ask make for changes only 7378 @param questionOnly flag indicating to ask make for changes only
7370 @type bool
7371 @param interactive flag indicating an interactive invocation (i.e.
7372 through a menu action)
7373 @type bool 7379 @type bool
7374 """ 7380 """
7375 if FileSystemUtilities.isRemoteFileName(self.ppath): 7381 if FileSystemUtilities.isRemoteFileName(self.ppath):
7376 EricMessageBox.critical( 7382 EricMessageBox.critical(
7377 self.ui, 7383 self.ui,

eric ide

mercurial