eric6/Project/Project.py

changeset 7900
72b88fb20261
parent 7836
2f0d208b8137
child 7907
7991ea245c20
equal deleted inserted replaced
7899:ecf67e07b6e0 7900:72b88fb20261
321 """ 321 """
322 Public method to register a project type. 322 Public method to register a project type.
323 323
324 @param type_ internal type designator to be registered (string) 324 @param type_ internal type designator to be registered (string)
325 @param description more verbose type name (display string) (string) 325 @param description more verbose type name (display string) (string)
326 @keyparam fileTypeCallback reference to a method returning a dictionary 326 @param fileTypeCallback reference to a method returning a dictionary
327 of filetype associations. 327 of filetype associations.
328 @keyparam binaryTranslationsCallback reference to a method returning 328 @param binaryTranslationsCallback reference to a method returning
329 the name of the binary translation file given the name of the raw 329 the name of the binary translation file given the name of the raw
330 translation file 330 translation file
331 @keyparam lexerAssociationCallback reference to a method returning the 331 @param lexerAssociationCallback reference to a method returning the
332 lexer type to be used for syntax highlighting given the name of 332 lexer type to be used for syntax highlighting given the name of
333 a file 333 a file
334 @keyparam progLanguages programming languages supported by the 334 @param progLanguages programming languages supported by the
335 project type (list of string) 335 project type (list of string)
336 """ 336 """
337 if progLanguages: 337 if progLanguages:
338 for progLanguage in progLanguages: 338 for progLanguage in progLanguages:
339 if progLanguage in ["Python", "Python2"]: 339 if progLanguage in ["Python", "Python2"]:
972 """ 972 """
973 Private method to read in the project session file (.e5s or .e4s). 973 Private method to read in the project session file (.e5s or .e4s).
974 974
975 @param quiet flag indicating quiet operations. 975 @param quiet flag indicating quiet operations.
976 If this flag is true, no errors are reported. 976 If this flag is true, no errors are reported.
977 @keyparam indicator indicator string (string) 977 @param indicator indicator string (string)
978 """ 978 """
979 if self.pfile is None: 979 if self.pfile is None:
980 if not quiet: 980 if not quiet:
981 E5MessageBox.critical( 981 E5MessageBox.critical(
982 self.ui, 982 self.ui,
1011 """ 1011 """
1012 Private method to write the session data to an XML file (.e5s). 1012 Private method to write the session data to an XML file (.e5s).
1013 1013
1014 @param quiet flag indicating quiet operations. 1014 @param quiet flag indicating quiet operations.
1015 If this flag is true, no errors are reported. 1015 If this flag is true, no errors are reported.
1016 @keyparam indicator indicator string (string) 1016 @param indicator indicator string (string)
1017 """ 1017 """
1018 if self.pfile is None: 1018 if self.pfile is None:
1019 if not quiet: 1019 if not quiet:
1020 E5MessageBox.critical( 1020 E5MessageBox.critical(
1021 self.ui, 1021 self.ui,
1322 @param excIgnoreList list of exceptions to be ignored 1322 @param excIgnoreList list of exceptions to be ignored
1323 @type list of str 1323 @type list of str
1324 @param autoClearShell flag indicating, that the interpreter window 1324 @param autoClearShell flag indicating, that the interpreter window
1325 should be cleared 1325 should be cleared
1326 @type bool 1326 @type bool
1327 @keyparam tracePython flag to indicate if the Python library should be 1327 @param tracePython flag to indicate if the Python library should be
1328 traced as well 1328 traced as well
1329 @type bool 1329 @type bool
1330 @keyparam autoContinue flag indicating, that the debugger should not 1330 @param autoContinue flag indicating, that the debugger should not
1331 stop at the first executable line 1331 stop at the first executable line
1332 @type bool 1332 @type bool
1333 """ 1333 """
1334 self.dbgVirtualEnv = venvName 1334 self.dbgVirtualEnv = venvName
1335 self.dbgCmdline = argv 1335 self.dbgCmdline = argv
2878 Public slot to open a project. 2878 Public slot to open a project.
2879 2879
2880 @param fn optional filename of the project file to be read 2880 @param fn optional filename of the project file to be read
2881 @param restoreSession flag indicating to restore the project 2881 @param restoreSession flag indicating to restore the project
2882 session (boolean) 2882 session (boolean)
2883 @keyparam reopen flag indicating a reopening of the project (boolean) 2883 @param reopen flag indicating a reopening of the project (boolean)
2884 """ 2884 """
2885 if not self.checkDirty(): 2885 if not self.checkDirty():
2886 return 2886 return
2887 2887
2888 if fn is None: 2888 if fn is None:
3159 @pyqtSlot() 3159 @pyqtSlot()
3160 def closeProject(self, reopen=False, noSave=False): 3160 def closeProject(self, reopen=False, noSave=False):
3161 """ 3161 """
3162 Public slot to close the current project. 3162 Public slot to close the current project.
3163 3163
3164 @keyparam reopen flag indicating a reopening of the project (boolean) 3164 @param reopen flag indicating a reopening of the project (boolean)
3165 @keyparam noSave flag indicating to not perform save actions (boolean) 3165 @param noSave flag indicating to not perform save actions (boolean)
3166 @return flag indicating success (boolean) 3166 @return flag indicating success (boolean)
3167 """ 3167 """
3168 # save the list of recently opened projects 3168 # save the list of recently opened projects
3169 self.__saveRecent() 3169 self.__saveRecent()
3170 3170
3262 3262
3263 def saveAllScripts(self, reportSyntaxErrors=False): 3263 def saveAllScripts(self, reportSyntaxErrors=False):
3264 """ 3264 """
3265 Public method to save all scripts belonging to the project. 3265 Public method to save all scripts belonging to the project.
3266 3266
3267 @keyparam reportSyntaxErrors flag indicating special reporting 3267 @param reportSyntaxErrors flag indicating special reporting
3268 for syntax errors (boolean) 3268 for syntax errors (boolean)
3269 @return flag indicating success (boolean) 3269 @return flag indicating success (boolean)
3270 """ 3270 """
3271 vm = e5App().getObject("ViewManager") 3271 vm = e5App().getObject("ViewManager")
3272 success = True 3272 success = True
3294 def checkAllScriptsDirty(self, reportSyntaxErrors=False): 3294 def checkAllScriptsDirty(self, reportSyntaxErrors=False):
3295 """ 3295 """
3296 Public method to check all scripts belonging to the project for 3296 Public method to check all scripts belonging to the project for
3297 their dirty status. 3297 their dirty status.
3298 3298
3299 @keyparam reportSyntaxErrors flag indicating special reporting 3299 @param reportSyntaxErrors flag indicating special reporting
3300 for syntax errors (boolean) 3300 for syntax errors (boolean)
3301 @return flag indicating success (boolean) 3301 @return flag indicating success (boolean)
3302 """ 3302 """
3303 vm = e5App().getObject("ViewManager") 3303 vm = e5App().getObject("ViewManager")
3304 success = True 3304 success = True

eric ide

mercurial