src/eric7/Plugins/WizardPlugins/EricPluginWizard/Templates.py

Sun, 17 Dec 2023 17:15:19 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Dec 2023 17:15:19 +0100
branch
eric7
changeset 10417
c6011e501282
parent 10284
83cc3ab2a612
child 10439
21c28b0f9e41
permissions
-rw-r--r--

Modernized some code and converted Debug Client and Debugger source code documentation to the new style.

6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
9653
e67609152c5e Updated copyright for 2023.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9433
diff changeset
3 # Copyright (c) 2014 - 2023 Detlev Offenbach <detlev@die-offenbachs.de>
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the various plug-in templates.
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 mainTemplate = '''# -*- coding: utf-8 -*-
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 # Copyright (c) {year} {author} <{email}>
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 #
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 Module documentation goes here.
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
19 from PyQt6.QtCore import QObject
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 {config0}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 # Start-Of-Header
10061
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
23 __header__ = {{
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
24 "name": "{name}",
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
25 "author": "{author} <{email}>",
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
26 "autoactivate": {autoactivate},
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
27 "deactivateable": {deactivateable},
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
28 "version": "{version}",
10283
897faacbeba5 Corrected the eric plugin wizard templates.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10252
diff changeset
29 {onDemand}\
10061
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
30 "className": "{className}",
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
31 "packageName": "{packageName}",
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
32 "shortDescription": "{shortDescription}",
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
33 "longDescription": (
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
34 """{longDescription}"""
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
35 ),
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
36 "needsRestart": {needsRestart},
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
37 "pyqtApi": 2,
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
38 }}
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 # End-Of-Header
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40
10061
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
41 error = "" # noqa: U200
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
42
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 {modulesetup}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 {exeData}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 {apiFiles}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 {preview}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 {config1}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 class {className}(QObject):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Class documentation goes here.
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 """
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
53
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 {config2}\
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 def __init__(self, ui):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 Constructor
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
58
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
59 @param ui reference to the user interface object
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
60 @type UI.UserInterface
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 """
10284
83cc3ab2a612 Corrected the eric plugin wizard templates.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10283
diff changeset
62 super().__init__(ui)
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 self.__ui = ui
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
64
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 def activate(self):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
67 Public method to activate this plug-in.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
68
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
69 @return tuple of None and activation status
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
70 @rtype bool
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 global error
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
73 error = "" # clear previous error
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
74
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 return None, True
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
76
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 def deactivate(self):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
79 Public method to deactivate this plug-in.
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81 pass
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 {config3}'''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83
9413
80c06d472826 Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9221
diff changeset
84 configTemplate0 = """from eric7 import Preferences
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
86 """
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 configTemplate1 = '''def getConfigData():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 Module function returning data as required by the configuration dialog.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
91
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 @return dictionary containing the relevant data
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
93 @rtype dict
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 return {{
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
96 "<unique key>": [
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
97 "<display string>",
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
98 "<pixmap filename>",
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
99 pageCreationFunction,
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
100 None,
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
101 None,
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
102 ],
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 }}
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 def prepareUninstall():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
108 Module function to prepare for an un-installation.
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 """
8637
394377638256 Replaced the direct access to 'Preferences.Prefs.settings' with 'Preferences.getSettings()'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8318
diff changeset
110 Preferences.getSettings().remove({className}.PreferencesKey)
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 configTemplate2 = """ PreferencesKey = "{preferencesKey}"
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
116
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
117 """
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
119 configTemplate3 = '''
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 def getPreferences(self, key):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
122 Public method to retrieve the various settings values.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
123
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 @param key the key of the value to get
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
125 @type str
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
126 @return the requested setting value
10417
c6011e501282 Modernized some code and converted Debug Client and Debugger source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10284
diff changeset
127 @rtype Any
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 return None
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
130
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 def setPreferences(self, key, value):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
133 Public method to store the various settings values.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
134
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
135 @param key the key of the setting to be set
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
136 @type str
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 @param value the value to be set
10417
c6011e501282 Modernized some code and converted Debug Client and Debugger source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10284
diff changeset
138 @type Any
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 pass
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
141 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142
10283
897faacbeba5 Corrected the eric plugin wizard templates.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10252
diff changeset
143 onDemandTemplate = """" pluginType": "{pluginType}",
10061
8bdad5699288 Introduced a new style for the plugin header.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
144 "pluginTypename": "{pluginTypename}",
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
145 """
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 previewPixmapTemplate = '''def previewPix():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 Module function to return a preview pixmap.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
150
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
151 @return preview pixmap
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
152 @rtype QPixmap
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 """
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
154 from PyQt6.QtGui import QPixmap
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
155
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 fname = "preview.png"
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 return QPixmap(fname)
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
158
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 exeDisplayDataListTemplate = '''def exeDisplayDataList():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 Module function to support the display of some executable info.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
165
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 @return list of dictionaries containing the data to query the presence of
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
167 the executable
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
168 @rtype list of dict
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 dataList = []
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 data = {
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 "programEntry": True,
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 "header": "<translated header string>",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 "exe": "dummyExe",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
175 "versionCommand": "--version",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176 "versionStartsWith": "dummyExe",
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
177 "versionRe": "",
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 "versionPosition": -1,
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
179 "version": "",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 "versionCleanup": None,
6479
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
181 "exeModule": None,
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
182 }
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
183 for exePath in ["exe1", "exe2"]:
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
184 data["exe"] = exePath
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 data["versionStartsWith"] = "<identifier>"
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 dataList.append(data.copy())
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 return dataList
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 exeDisplayDataTemplate = '''def exeDisplayData():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 Module function to support the display of some executable info.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
195
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196 @return dictionary containing the data to query the presence of
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 the executable
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
198 @rtype dict
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 data = {
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 "programEntry": True,
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 "header": "<translated header string>",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
203 "exe": exe,
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204 "versionCommand": "--version",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 "versionStartsWith": "<identifier>",
10252
64660db96a7a Eric Plugin Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10061
diff changeset
206 "versionRe": None,
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 "versionPosition": -1,
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
208 "version": "",
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209 "versionCleanup": None,
6479
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
210 "exeModule": None,
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
211 }
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
212
6479
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
213 return data
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
214
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
215
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
216 '''
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
217
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
218 exeDisplayDataInfoTemplate = '''def exeDisplayData():
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
219 """
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
220 Module function to support the display of some executable info.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
221
6479
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
222 @return dictionary containing the data to be shown
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
223 @rtype dict
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
224 """
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
225 data = {
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
226 "programEntry": False,
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
227 "header": "<translated header string>",
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
228 "text": "<translated entry string>",
2ae32c9f9792 PluginWizardDialog: corrected existing templates and added template and button for an exeDisplayData() function returning ready made version info.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6069
diff changeset
229 "version": "",
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 }
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
231
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232 return data
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 moduleSetupTemplate = '''def moduleSetup():
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 Module function to perform module level setup.
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 """
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241 pass
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 '''
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 apiFilesTemplate = '''def apiFiles(language):
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 """
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
248 Module function to return the API files made available by this plug-in.
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
249
6069
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
250 @param language language to get APIs for
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
251 @type str
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
252 @return list of API filenames
25114fbfb731 Corrected some template code in the eric plug-in wizard.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
253 @rtype list of str
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 """
9433
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
255 if language in ("Python3", "Python"):
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
256 apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python")
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
257 apis = glob.glob(os.path.join(apisDir, "*.api"))
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
258 apisDir = os.path.join(os.path.dirname(__file__), "APIs", "Python3")
6df1aeaa4529 Adjusted some wizard code generators to output Black compatible code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
259 apis.extend(glob.glob(os.path.join(apisDir, "*.api")))
6016
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 else:
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
261 apis = []
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 return apis
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264
3d594f66a7f7 Added the eric plug-in wizard plug-in to the core plug-ins.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 '''
7258
aff39db4dacc Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
266
aff39db4dacc Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
267 #
aff39db4dacc Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
268 # eflag: noqa = M841

eric ide

mercurial