Plugins/PluginEricapi.py

changeset 945
8cd4d08fa9f6
parent 908
d00447340771
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
37 pyqtApi = 2 37 pyqtApi = 2
38 # End-Of-Header 38 # End-Of-Header
39 39
40 error = "" 40 error = ""
41 41
42
42 def exeDisplayData(): 43 def exeDisplayData():
43 """ 44 """
44 Public method to support the display of some executable info. 45 Public method to support the display of some executable info.
45 46
46 @return dictionary containing the data to query the presence of 47 @return dictionary containing the data to query the presence of
47 the executable 48 the executable
48 """ 49 """
49 exe = 'eric5_api' 50 exe = 'eric5_api'
50 if Utilities.isWindowsPlatform(): 51 if Utilities.isWindowsPlatform():
51 exe = os.path.join(getConfig("bindir"), exe +'.bat') 52 exe = os.path.join(getConfig("bindir"), exe + '.bat')
52 53
53 data = { 54 data = {
54 "programEntry" : True, 55 "programEntry": True,
55 "header" : QApplication.translate("EricapiPlugin", 56 "header": QApplication.translate("EricapiPlugin",
56 "Eric5 API File Generator"), 57 "Eric5 API File Generator"),
57 "exe" : exe, 58 "exe": exe,
58 "versionCommand" : '--version', 59 "versionCommand": '--version',
59 "versionStartsWith" : 'eric5_', 60 "versionStartsWith": 'eric5_',
60 "versionPosition" : -3, 61 "versionPosition": -3,
61 "version" : "", 62 "version": "",
62 "versionCleanup" : None, 63 "versionCleanup": None,
63 } 64 }
64 65
65 return data 66 return data
67
66 68
67 class EricapiPlugin(QObject): 69 class EricapiPlugin(QObject):
68 """ 70 """
69 Class implementing the Ericapi plugin. 71 Class implementing the Ericapi plugin.
70 """ 72 """
121 e5App().getObject("Project").removeE5Actions([self.__projectAct]) 123 e5App().getObject("Project").removeE5Actions([self.__projectAct])
122 self.__initialize() 124 self.__initialize()
123 125
124 def __projectShowMenu(self, menuName, menu): 126 def __projectShowMenu(self, menuName, menu):
125 """ 127 """
126 Private slot called, when the the project menu or a submenu is 128 Private slot called, when the the project menu or a submenu is
127 about to be shown. 129 about to be shown.
128 130
129 @param menuName name of the menu to be shown (string) 131 @param menuName name of the menu to be shown (string)
130 @param menu reference to the menu (QMenu) 132 @param menu reference to the menu (QMenu)
131 """ 133 """
138 def __doEricapi(self): 140 def __doEricapi(self):
139 """ 141 """
140 Private slot to perform the eric5_api api generation. 142 Private slot to perform the eric5_api api generation.
141 """ 143 """
142 eolTranslation = { 144 eolTranslation = {
143 '\r' : 'cr', 145 '\r': 'cr',
144 '\n' : 'lf', 146 '\n': 'lf',
145 '\r\n' : 'crlf', 147 '\r\n': 'crlf',
146 } 148 }
147 project = e5App().getObject("Project") 149 project = e5App().getObject("Project")
148 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4API") 150 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4API")
149 dlg = EricapiConfigDialog(project, parms) 151 dlg = EricapiConfigDialog(project, parms)
150 if dlg.exec_() == QDialog.Accepted: 152 if dlg.exec_() == QDialog.Accepted:

eric ide

mercurial