263 self.__binaryTranslationsCallbacks = {} |
264 self.__binaryTranslationsCallbacks = {} |
264 |
265 |
265 self.__projectTypes = { |
266 self.__projectTypes = { |
266 "PyQt5": self.tr("PyQt5 GUI"), |
267 "PyQt5": self.tr("PyQt5 GUI"), |
267 "PyQt5C": self.tr("PyQt5 Console"), |
268 "PyQt5C": self.tr("PyQt5 Console"), |
|
269 "PyQt6": self.tr("PyQt6 GUI"), |
|
270 "PyQt6C": self.tr("PyQt6 Console"), |
268 "E6Plugin": self.tr("Eric6 Plugin"), |
271 "E6Plugin": self.tr("Eric6 Plugin"), |
269 "Console": self.tr("Console"), |
272 "Console": self.tr("Console"), |
270 "Other": self.tr("Other"), |
273 "Other": self.tr("Other"), |
271 } |
274 } |
272 |
275 |
273 self.__projectProgLanguages = { |
276 self.__projectProgLanguages = { |
274 "Python3": ["PyQt5", "PyQt5C", "E6Plugin", "Console", "Other"], |
277 "Python3": ["PyQt5", "PyQt5C", "PyQt6", "PyQt6C", "E6Plugin", |
|
278 "Console", "Other"], |
275 "MicroPython": ["Console", "Other"], |
279 "MicroPython": ["Console", "Other"], |
276 "Ruby": ["Console", "Other"], |
280 "Ruby": ["Console", "Other"], |
277 "JavaScript": ["Other"], |
281 "JavaScript": ["Other"], |
278 } |
282 } |
279 |
283 |
280 if Utilities.checkPyside(): |
284 if Utilities.checkPyside(variant=2): |
281 self.__projectTypes["PySide2"] = self.tr("PySide2 GUI") |
285 self.__projectTypes["PySide2"] = self.tr("PySide2 GUI") |
282 self.__projectTypes["PySide2C"] = self.tr("PySide2 Console") |
286 self.__projectTypes["PySide2C"] = self.tr("PySide2 Console") |
283 self.__projectProgLanguages["Python3"].extend( |
287 self.__projectProgLanguages["Python3"].extend( |
284 ["PySide2", "PySide2C"]) |
288 ["PySide2", "PySide2C"]) |
|
289 |
|
290 if Utilities.checkPyside(variant=6): |
|
291 self.__projectTypes["PySide6"] = self.tr("PySide6 GUI") |
|
292 self.__projectTypes["PySide6C"] = self.tr("PySide6 Console") |
|
293 self.__projectProgLanguages["Python3"].extend( |
|
294 ["PySide6", "PySide6C"]) |
285 |
295 |
286 def getProjectTypes(self, progLanguage=""): |
296 def getProjectTypes(self, progLanguage=""): |
287 """ |
297 """ |
288 Public method to get the list of supported project types. |
298 Public method to get the list of supported project types. |
289 |
299 |
321 """ |
331 """ |
322 Public method to register a project type. |
332 Public method to register a project type. |
323 |
333 |
324 @param type_ internal type designator to be registered (string) |
334 @param type_ internal type designator to be registered (string) |
325 @param description more verbose type name (display string) (string) |
335 @param description more verbose type name (display string) (string) |
326 @keyparam fileTypeCallback reference to a method returning a dictionary |
336 @param fileTypeCallback reference to a method returning a dictionary |
327 of filetype associations. |
337 of filetype associations. |
328 @keyparam binaryTranslationsCallback reference to a method returning |
338 @param binaryTranslationsCallback reference to a method returning |
329 the name of the binary translation file given the name of the raw |
339 the name of the binary translation file given the name of the raw |
330 translation file |
340 translation file |
331 @keyparam lexerAssociationCallback reference to a method returning the |
341 @param lexerAssociationCallback reference to a method returning the |
332 lexer type to be used for syntax highlighting given the name of |
342 lexer type to be used for syntax highlighting given the name of |
333 a file |
343 a file |
334 @keyparam progLanguages programming languages supported by the |
344 @param progLanguages programming languages supported by the |
335 project type (list of string) |
345 project type (list of string) |
336 """ |
346 """ |
337 if progLanguages: |
347 if progLanguages: |
338 for progLanguage in progLanguages: |
348 for progLanguage in progLanguages: |
339 if progLanguage in ["Python", "Python2"]: |
349 if progLanguage in ["Python", "Python2"]: |
508 PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, |
521 PROJECTTYPESPECIFICDATA, CHECKERSPARMS, PACKAGERSPARMS, |
509 DOCUMENTATIONPARMS or OTHERTOOLSPARMS) |
522 DOCUMENTATIONPARMS or OTHERTOOLSPARMS) |
510 @param key key of the data entry to get (string). |
523 @param key key of the data entry to get (string). |
511 @return a copy of the requested data or None |
524 @return a copy of the requested data or None |
512 """ |
525 """ |
|
526 # __IGNORE_WARNING_D202__ |
513 if ( |
527 if ( |
514 category in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", |
528 category in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", |
515 "PACKAGERSPARMS", "DOCUMENTATIONPARMS", |
529 "PACKAGERSPARMS", "DOCUMENTATIONPARMS", |
516 "OTHERTOOLSPARMS"] and |
530 "OTHERTOOLSPARMS"] and |
517 key in self.pdata[category] |
531 key in self.pdata[category] |
529 DOCUMENTATIONPARMS or OTHERTOOLSPARMS) |
543 DOCUMENTATIONPARMS or OTHERTOOLSPARMS) |
530 @param key key of the data entry to get (string). |
544 @param key key of the data entry to get (string). |
531 @param data data to be stored |
545 @param data data to be stored |
532 @return flag indicating success (boolean) |
546 @return flag indicating success (boolean) |
533 """ |
547 """ |
|
548 # __IGNORE_WARNING_D202__ |
534 if category not in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", |
549 if category not in ["PROJECTTYPESPECIFICDATA", "CHECKERSPARMS", |
535 "PACKAGERSPARMS", "DOCUMENTATIONPARMS", |
550 "PACKAGERSPARMS", "DOCUMENTATIONPARMS", |
536 "OTHERTOOLSPARMS"]: |
551 "OTHERTOOLSPARMS"]: |
537 return False |
552 return False |
538 |
553 |
587 self.pdata["FILETYPES"]["*.proto"] = "PROTOCOLS" |
602 self.pdata["FILETYPES"]["*.proto"] = "PROTOCOLS" |
588 |
603 |
589 # Forms |
604 # Forms |
590 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
605 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
591 "PyQt5", |
606 "PyQt5", |
592 "PySide2"]: |
607 "PyQt6", |
|
608 "PySide2", |
|
609 "PySide6"]: |
593 self.pdata["FILETYPES"]["*.ui"] = "FORMS" |
610 self.pdata["FILETYPES"]["*.ui"] = "FORMS" |
594 |
611 |
595 # Resources |
612 # Resources |
596 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
613 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
597 "PyQt5", "PyQt5C", |
614 "PyQt5", "PyQt5C", |
598 "PySide2", "PySide2C"]: |
615 "PySide2", "PySide2C", |
|
616 "PySide6", "PySide6C"]: |
599 self.pdata["FILETYPES"]["*.qrc"] = "RESOURCES" |
617 self.pdata["FILETYPES"]["*.qrc"] = "RESOURCES" |
600 |
618 |
601 # Translations |
619 # Translations |
602 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
620 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
603 "PyQt5", "PyQt5C", |
621 "PyQt5", "PyQt5C", |
604 "PySide2", "PySide2C"]: |
622 "PyQt6", "PyQt6C", |
|
623 "PySide2", "PySide2C", |
|
624 "PySide6", "PySide6C"]: |
605 self.pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
625 self.pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
606 self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
626 self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
607 |
627 |
608 # Project type specific ones |
628 # Project type specific ones |
609 try: |
629 try: |
621 Public method to update the filetype associations with new default |
641 Public method to update the filetype associations with new default |
622 values. |
642 values. |
623 """ |
643 """ |
624 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
644 if self.pdata["PROJECTTYPE"] in ["E6Plugin", |
625 "PyQt5", "PyQt5C", |
645 "PyQt5", "PyQt5C", |
626 "PySide2", "PySide2C"]: |
646 "PyQt6", "PyQt6C", |
|
647 "PySide2", "PySide2C", |
|
648 "PySide6", "PySide6C"]: |
627 if "*.ts" not in self.pdata["FILETYPES"]: |
649 if "*.ts" not in self.pdata["FILETYPES"]: |
628 self.pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
650 self.pdata["FILETYPES"]["*.ts"] = "TRANSLATIONS" |
629 if "*.qm" not in self.pdata["FILETYPES"]: |
651 if "*.qm" not in self.pdata["FILETYPES"]: |
630 self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
652 self.pdata["FILETYPES"]["*.qm"] = "TRANSLATIONS" |
631 try: |
653 try: |
972 """ |
994 """ |
973 Private method to read in the project session file (.e5s or .e4s). |
995 Private method to read in the project session file (.e5s or .e4s). |
974 |
996 |
975 @param quiet flag indicating quiet operations. |
997 @param quiet flag indicating quiet operations. |
976 If this flag is true, no errors are reported. |
998 If this flag is true, no errors are reported. |
977 @keyparam indicator indicator string (string) |
999 @param indicator indicator string (string) |
978 """ |
1000 """ |
979 if self.pfile is None: |
1001 if self.pfile is None: |
980 if not quiet: |
1002 if not quiet: |
981 E5MessageBox.critical( |
1003 E5MessageBox.critical( |
982 self.ui, |
1004 self.ui, |
1011 """ |
1033 """ |
1012 Private method to write the session data to an XML file (.e5s). |
1034 Private method to write the session data to an XML file (.e5s). |
1013 |
1035 |
1014 @param quiet flag indicating quiet operations. |
1036 @param quiet flag indicating quiet operations. |
1015 If this flag is true, no errors are reported. |
1037 If this flag is true, no errors are reported. |
1016 @keyparam indicator indicator string (string) |
1038 @param indicator indicator string (string) |
1017 """ |
1039 """ |
1018 if self.pfile is None: |
1040 if self.pfile is None: |
1019 if not quiet: |
1041 if not quiet: |
1020 E5MessageBox.critical( |
1042 E5MessageBox.critical( |
1021 self.ui, |
1043 self.ui, |
1301 else: |
1323 else: |
1302 return self.debugProperties[key] |
1324 return self.debugProperties[key] |
1303 |
1325 |
1304 def setDbgInfo(self, venvName, argv, wd, env, excReporting, excList, |
1326 def setDbgInfo(self, venvName, argv, wd, env, excReporting, excList, |
1305 excIgnoreList, autoClearShell, tracePython=None, |
1327 excIgnoreList, autoClearShell, tracePython=None, |
1306 autoContinue=None): |
1328 autoContinue=None, enableMultiprocess=None, |
|
1329 multiprocessNoDebug=None): |
1307 """ |
1330 """ |
1308 Public method to set the debugging information. |
1331 Public method to set the debugging information. |
1309 |
1332 |
1310 @param venvName name of the virtual environment used |
1333 @param venvName name of the virtual environment used |
1311 @type str |
1334 @type str |
1322 @param excIgnoreList list of exceptions to be ignored |
1345 @param excIgnoreList list of exceptions to be ignored |
1323 @type list of str |
1346 @type list of str |
1324 @param autoClearShell flag indicating, that the interpreter window |
1347 @param autoClearShell flag indicating, that the interpreter window |
1325 should be cleared |
1348 should be cleared |
1326 @type bool |
1349 @type bool |
1327 @keyparam tracePython flag to indicate if the Python library should be |
1350 @param tracePython flag to indicate if the Python library should be |
1328 traced as well |
1351 traced as well |
1329 @type bool |
1352 @type bool |
1330 @keyparam autoContinue flag indicating, that the debugger should not |
1353 @param autoContinue flag indicating, that the debugger should not |
1331 stop at the first executable line |
1354 stop at the first executable line |
1332 @type bool |
1355 @type bool |
|
1356 @param enableMultiprocess flag indicating, that the debugger should |
|
1357 run in multi process mode |
|
1358 @type bool |
|
1359 @param multiprocessNoDebug list of programs not to be debugged in |
|
1360 multi process mode |
|
1361 @type str |
1333 """ |
1362 """ |
1334 self.dbgVirtualEnv = venvName |
1363 self.dbgVirtualEnv = venvName |
1335 self.dbgCmdline = argv |
1364 self.dbgCmdline = argv |
1336 self.dbgWd = wd |
1365 self.dbgWd = wd |
1337 self.dbgEnv = env |
1366 self.dbgEnv = env |
1341 self.dbgAutoClearShell = autoClearShell |
1370 self.dbgAutoClearShell = autoClearShell |
1342 if tracePython is not None: |
1371 if tracePython is not None: |
1343 self.dbgTracePython = tracePython |
1372 self.dbgTracePython = tracePython |
1344 if autoContinue is not None: |
1373 if autoContinue is not None: |
1345 self.dbgAutoContinue = autoContinue |
1374 self.dbgAutoContinue = autoContinue |
|
1375 if enableMultiprocess is not None: |
|
1376 self.dbgEnableMultiprocess = enableMultiprocess |
|
1377 if multiprocessNoDebug is not None: |
|
1378 self.dbgMultiprocessNoDebug = multiprocessNoDebug |
1346 |
1379 |
1347 def getTranslationPattern(self): |
1380 def getTranslationPattern(self): |
1348 """ |
1381 """ |
1349 Public method to get the translation pattern. |
1382 Public method to get the translation pattern. |
1350 |
1383 |
1376 from .AddLanguageDialog import AddLanguageDialog |
1409 from .AddLanguageDialog import AddLanguageDialog |
1377 dlg = AddLanguageDialog(self.parent()) |
1410 dlg = AddLanguageDialog(self.parent()) |
1378 if dlg.exec() == QDialog.Accepted: |
1411 if dlg.exec() == QDialog.Accepted: |
1379 lang = dlg.getSelectedLanguage() |
1412 lang = dlg.getSelectedLanguage() |
1380 if self.pdata["PROJECTTYPE"] in [ |
1413 if self.pdata["PROJECTTYPE"] in [ |
1381 "PyQt5", "PyQt5C", "E6Plugin", "PySide2", "PySide2C" |
1414 "PyQt5", "PyQt5C", "PyQt6", "PyQt6C", "E6Plugin", |
|
1415 "PySide2", "PySide2C", "PySide6", "PySide6C" |
1382 ]: |
1416 ]: |
1383 langFile = self.pdata["TRANSLATIONPATTERN"].replace( |
1417 langFile = self.pdata["TRANSLATIONPATTERN"].replace( |
1384 "%language%", lang) |
1418 "%language%", lang) |
1385 self.appendFile(langFile) |
1419 self.appendFile(langFile) |
1386 self.projectLanguageAddedByCode.emit(lang) |
1420 self.projectLanguageAddedByCode.emit(lang) |
2833 dlg = FiletypeAssociationDialog(self) |
2867 dlg = FiletypeAssociationDialog(self) |
2834 if dlg.exec() == QDialog.Accepted: |
2868 if dlg.exec() == QDialog.Accepted: |
2835 dlg.transferData() |
2869 dlg.transferData() |
2836 self.setDirty(True) |
2870 self.setDirty(True) |
2837 self.__reorganizeFiles() |
2871 self.__reorganizeFiles() |
2838 |
2872 |
|
2873 def getFiletypeAssociations(self, associationType): |
|
2874 """ |
|
2875 Public method to get the list of file type associations for |
|
2876 the given association type. |
|
2877 |
|
2878 @param associationType type of the association (one of FORMS, |
|
2879 INTERFACES, OTHERS, PROTOCOLS, RESOURCES, SOURCES or |
|
2880 TRANSLATIONS) |
|
2881 @type str |
|
2882 @return list of file patterns for the given type |
|
2883 @rtype list of str |
|
2884 """ |
|
2885 return [assoc for assoc in self.pdata["FILETYPES"] |
|
2886 if self.pdata["FILETYPES"][assoc] == associationType] |
|
2887 |
2839 def __showLexerAssociations(self): |
2888 def __showLexerAssociations(self): |
2840 """ |
2889 """ |
2841 Private slot to display the lexer association dialog. |
2890 Private slot to display the lexer association dialog. |
2842 """ |
2891 """ |
2843 from .LexerAssociationDialog import LexerAssociationDialog |
2892 from .LexerAssociationDialog import LexerAssociationDialog |
3159 @pyqtSlot() |
3208 @pyqtSlot() |
3160 def closeProject(self, reopen=False, noSave=False): |
3209 def closeProject(self, reopen=False, noSave=False): |
3161 """ |
3210 """ |
3162 Public slot to close the current project. |
3211 Public slot to close the current project. |
3163 |
3212 |
3164 @keyparam reopen flag indicating a reopening of the project (boolean) |
3213 @param reopen flag indicating a reopening of the project (boolean) |
3165 @keyparam noSave flag indicating to not perform save actions (boolean) |
3214 @param noSave flag indicating to not perform save actions (boolean) |
3166 @return flag indicating success (boolean) |
3215 @return flag indicating success (boolean) |
3167 """ |
3216 """ |
3168 # save the list of recently opened projects |
3217 # save the list of recently opened projects |
3169 self.__saveRecent() |
3218 self.__saveRecent() |
3170 |
3219 |
3262 |
3311 |
3263 def saveAllScripts(self, reportSyntaxErrors=False): |
3312 def saveAllScripts(self, reportSyntaxErrors=False): |
3264 """ |
3313 """ |
3265 Public method to save all scripts belonging to the project. |
3314 Public method to save all scripts belonging to the project. |
3266 |
3315 |
3267 @keyparam reportSyntaxErrors flag indicating special reporting |
3316 @param reportSyntaxErrors flag indicating special reporting |
3268 for syntax errors (boolean) |
3317 for syntax errors (boolean) |
3269 @return flag indicating success (boolean) |
3318 @return flag indicating success (boolean) |
3270 """ |
3319 """ |
3271 vm = e5App().getObject("ViewManager") |
3320 vm = e5App().getObject("ViewManager") |
3272 success = True |
3321 success = True |
3294 def checkAllScriptsDirty(self, reportSyntaxErrors=False): |
3343 def checkAllScriptsDirty(self, reportSyntaxErrors=False): |
3295 """ |
3344 """ |
3296 Public method to check all scripts belonging to the project for |
3345 Public method to check all scripts belonging to the project for |
3297 their dirty status. |
3346 their dirty status. |
3298 |
3347 |
3299 @keyparam reportSyntaxErrors flag indicating special reporting |
3348 @param reportSyntaxErrors flag indicating special reporting |
3300 for syntax errors (boolean) |
3349 for syntax errors (boolean) |
3301 @return flag indicating success (boolean) |
3350 @return flag indicating success (boolean) |
3302 """ |
3351 """ |
3303 vm = e5App().getObject("ViewManager") |
3352 vm = e5App().getObject("ViewManager") |
3304 success = True |
3353 success = True |
4205 self.tr('Create Package List'), |
4254 self.tr('Create Package List'), |
4206 UI.PixmapCache.getIcon("pluginArchiveList"), |
4255 UI.PixmapCache.getIcon("pluginArchiveList"), |
4207 self.tr('Create &Package List'), 0, 0, |
4256 self.tr('Create &Package List'), 0, 0, |
4208 self.pluginGrp, 'project_plugin_pkglist') |
4257 self.pluginGrp, 'project_plugin_pkglist') |
4209 self.pluginPkgListAct.setStatusTip( |
4258 self.pluginPkgListAct.setStatusTip( |
4210 self.tr('Create an initial PKGLIST file for an eric6 plugin.')) |
4259 self.tr('Create an initial PKGLIST file for an eric plugin.')) |
4211 self.pluginPkgListAct.setWhatsThis(self.tr( |
4260 self.pluginPkgListAct.setWhatsThis(self.tr( |
4212 """<b>Create Package List</b>""" |
4261 """<b>Create Package List</b>""" |
4213 """<p>This creates an initial list of files to include in an""" |
4262 """<p>This creates an initial list of files to include in an""" |
4214 """ eric6 plugin archive. The list is created from the project""" |
4263 """ eric plugin archive. The list is created from the project""" |
4215 """ file.</p>""" |
4264 """ file.</p>""" |
4216 )) |
4265 )) |
4217 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList) |
4266 self.pluginPkgListAct.triggered.connect(self.__pluginCreatePkgList) |
4218 self.actions.append(self.pluginPkgListAct) |
4267 self.actions.append(self.pluginPkgListAct) |
4219 |
4268 |
4221 self.tr('Create Plugin Archives'), |
4270 self.tr('Create Plugin Archives'), |
4222 UI.PixmapCache.getIcon("pluginArchive"), |
4271 UI.PixmapCache.getIcon("pluginArchive"), |
4223 self.tr('Create Plugin &Archives'), 0, 0, |
4272 self.tr('Create Plugin &Archives'), 0, 0, |
4224 self.pluginGrp, 'project_plugin_archive') |
4273 self.pluginGrp, 'project_plugin_archive') |
4225 self.pluginArchiveAct.setStatusTip( |
4274 self.pluginArchiveAct.setStatusTip( |
4226 self.tr('Create eric6 plugin archive files.')) |
4275 self.tr('Create eric plugin archive files.')) |
4227 self.pluginArchiveAct.setWhatsThis(self.tr( |
4276 self.pluginArchiveAct.setWhatsThis(self.tr( |
4228 """<b>Create Plugin Archives</b>""" |
4277 """<b>Create Plugin Archives</b>""" |
4229 """<p>This creates eric6 plugin archive files using the list""" |
4278 """<p>This creates eric plugin archive files using the list""" |
4230 """ of files given in a PKGLIST* file. The archive name is""" |
4279 """ of files given in a PKGLIST* file. The archive name is""" |
4231 """ built from the main script name if not designated in""" |
4280 """ built from the main script name if not designated in""" |
4232 """ the package list file.</p>""" |
4281 """ the package list file.</p>""" |
4233 )) |
4282 )) |
4234 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchives) |
4283 self.pluginArchiveAct.triggered.connect(self.__pluginCreateArchives) |
4238 self.tr('Create Plugin Archives (Snapshot)'), |
4287 self.tr('Create Plugin Archives (Snapshot)'), |
4239 UI.PixmapCache.getIcon("pluginArchiveSnapshot"), |
4288 UI.PixmapCache.getIcon("pluginArchiveSnapshot"), |
4240 self.tr('Create Plugin Archives (&Snapshot)'), 0, 0, |
4289 self.tr('Create Plugin Archives (&Snapshot)'), 0, 0, |
4241 self.pluginGrp, 'project_plugin_sarchive') |
4290 self.pluginGrp, 'project_plugin_sarchive') |
4242 self.pluginSArchiveAct.setStatusTip(self.tr( |
4291 self.pluginSArchiveAct.setStatusTip(self.tr( |
4243 'Create eric6 plugin archive files (snapshot releases).')) |
4292 'Create eric plugin archive files (snapshot releases).')) |
4244 self.pluginSArchiveAct.setWhatsThis(self.tr( |
4293 self.pluginSArchiveAct.setWhatsThis(self.tr( |
4245 """<b>Create Plugin Archives (Snapshot)</b>""" |
4294 """<b>Create Plugin Archives (Snapshot)</b>""" |
4246 """<p>This creates eric6 plugin archive files using the list""" |
4295 """<p>This creates eric plugin archive files using the list""" |
4247 """ of files given in the PKGLIST* file. The archive name is""" |
4296 """ of files given in the PKGLIST* file. The archive name is""" |
4248 """ built from the main script name if not designated in""" |
4297 """ built from the main script name if not designated in""" |
4249 """ the package list file. The version entry of the main script""" |
4298 """ the package list file. The version entry of the main script""" |
4250 """ is modified to reflect a snapshot release.</p>""" |
4299 """ is modified to reflect a snapshot release.</p>""" |
4251 )) |
4300 )) |
5294 self.appendFile("PKGLIST") |
5343 self.appendFile("PKGLIST") |
5295 |
5344 |
5296 @pyqtSlot() |
5345 @pyqtSlot() |
5297 def __pluginCreateArchives(self, snapshot=False): |
5346 def __pluginCreateArchives(self, snapshot=False): |
5298 """ |
5347 """ |
5299 Private slot to create eric6 plugin archives. |
5348 Private slot to create eric plugin archives. |
5300 |
5349 |
5301 @param snapshot flag indicating snapshot archives (boolean) |
5350 @param snapshot flag indicating snapshot archives (boolean) |
5302 """ |
5351 """ |
5303 if not self.pdata["MAINSCRIPT"]: |
5352 if not self.pdata["MAINSCRIPT"]: |
5304 E5MessageBox.critical( |
5353 E5MessageBox.critical( |
5407 except OSError as why: |
5456 except OSError as why: |
5408 E5MessageBox.critical( |
5457 E5MessageBox.critical( |
5409 self.ui, |
5458 self.ui, |
5410 self.tr("Create Plugin Archive"), |
5459 self.tr("Create Plugin Archive"), |
5411 self.tr( |
5460 self.tr( |
5412 """<p>The eric6 plugin archive file <b>{0}</b>""" |
5461 """<p>The eric plugin archive file <b>{0}</b>""" |
5413 """ could not be created.</p>""" |
5462 """ could not be created.</p>""" |
5414 """<p>Reason: {1}</p>""").format(archive, str(why))) |
5463 """<p>Reason: {1}</p>""").format(archive, str(why))) |
5415 errors += 1 |
5464 errors += 1 |
5416 count += 1 |
5465 count += 1 |
5417 continue |
5466 continue |
5458 count += 1 |
5507 count += 1 |
5459 |
5508 |
5460 progress.setValue(len(selectedLists)) |
5509 progress.setValue(len(selectedLists)) |
5461 |
5510 |
5462 if errors: |
5511 if errors: |
5463 message = self.tr("<p>The eric6 plugin archive files were " |
|
5464 "created with some errors.</p>") |
|
5465 else: |
|
5466 message = self.tr("<p>The eric6 plugin archive files were " |
|
5467 "created successfully.</p>") |
|
5468 if self.ui.notificationsEnabled(): |
|
5469 self.ui.showNotification( |
5512 self.ui.showNotification( |
5470 UI.PixmapCache.getPixmap("pluginArchive48"), |
5513 UI.PixmapCache.getPixmap("pluginArchive48"), |
5471 self.tr("Create Plugin Archive"), |
5514 self.tr("Create Plugin Archive"), |
5472 message) |
5515 self.tr("<p>The eric plugin archive files were " |
|
5516 "created with some errors.</p>"), |
|
5517 kind=NotificationTypes.Critical, |
|
5518 timeout=0) |
5473 else: |
5519 else: |
5474 E5MessageBox.information( |
5520 self.ui.showNotification( |
5475 self.ui, |
5521 UI.PixmapCache.getPixmap("pluginArchive48"), |
5476 self.tr("Create Plugin Archive"), |
5522 self.tr("Create Plugin Archive"), |
5477 message) |
5523 self.tr("<p>The eric plugin archive files were " |
|
5524 "created successfully.</p>")) |
5478 |
5525 |
5479 def __pluginCreateSnapshotArchives(self): |
5526 def __pluginCreateSnapshotArchives(self): |
5480 """ |
5527 """ |
5481 Private slot to create eric6 plugin archive snapshot releases. |
5528 Private slot to create eric plugin archive snapshot releases. |
5482 """ |
5529 """ |
5483 self.__pluginCreateArchives(True) |
5530 self.__pluginCreateArchives(True) |
5484 |
5531 |
5485 def __createZipDirEntries(self, path, zipFile): |
5532 def __createZipDirEntries(self, path, zipFile): |
5486 """ |
5533 """ |
5731 else: |
5778 else: |
5732 message = self.tr( |
5779 message = self.tr( |
5733 """<p>There are changes that require the default""" |
5780 """<p>There are changes that require the default""" |
5734 """ make target to be rebuilt.</p>""") |
5781 """ make target to be rebuilt.</p>""") |
5735 |
5782 |
5736 if self.ui.notificationsEnabled() and not interactive: |
5783 self.ui.showNotification( |
5737 self.ui.showNotification( |
5784 UI.PixmapCache.getPixmap("makefile48"), |
5738 UI.PixmapCache.getPixmap("makefile48"), |
5785 title, |
5739 title, |
5786 message, |
5740 message) |
5787 kind=NotificationTypes.Warning, |
5741 else: |
5788 timeout=0) |
5742 E5MessageBox.information(self.ui, title, message) |
|
5743 elif exitCode > 1: |
5789 elif exitCode > 1: |
5744 E5MessageBox.critical( |
5790 E5MessageBox.critical( |
5745 self.ui, |
5791 self.ui, |
5746 self.tr("Execute Make"), |
5792 self.tr("Execute Make"), |
5747 self.tr("""The makefile contains errors.""")) |
5793 self.tr("""The makefile contains errors.""")) |
5835 "CompressionThreshold": 70, # default value |
5881 "CompressionThreshold": 70, # default value |
5836 "CompressLevel": 0, # use zlib default |
5882 "CompressLevel": 0, # use zlib default |
5837 "CompressionDisable": False, |
5883 "CompressionDisable": False, |
5838 "PathPrefix": "", |
5884 "PathPrefix": "", |
5839 } |
5885 } |
|
5886 |
|
5887 ######################################################################### |
|
5888 ## Below are methods implementing some 'docstring' support functions |
|
5889 ######################################################################### |
|
5890 |
|
5891 def hasDefaultDocstringParameter(self): |
|
5892 """ |
|
5893 Public method to test, if the project contains the default docstring |
|
5894 parameter. |
|
5895 |
|
5896 @return flag indicating default parameter |
|
5897 @rtype bool |
|
5898 """ |
|
5899 return self.pdata["DOCSTRING"] == "" |
|
5900 |
|
5901 def getDocstringType(self): |
|
5902 """ |
|
5903 Public method to get the configured docstring style. |
|
5904 |
|
5905 @return configured docstring style |
|
5906 @rtype str |
|
5907 """ |
|
5908 return self.pdata["DOCSTRING"] |
5840 |
5909 |
5841 # |
5910 # |
5842 # eflag: noqa = M601 |
5911 # eflag: noqa = M601 |