44 Public method to support the display of some executable info. |
44 Public method to support the display of some executable info. |
45 |
45 |
46 @return dictionary containing the data to query the presence of |
46 @return dictionary containing the data to query the presence of |
47 the executable |
47 the executable |
48 """ |
48 """ |
49 exe = 'eric5-api' |
49 exe = 'eric5_api' |
50 if Utilities.isWindowsPlatform(): |
50 if Utilities.isWindowsPlatform(): |
51 exe = os.path.join(getConfig("bindir"), exe +'.bat') |
51 exe = os.path.join(getConfig("bindir"), exe +'.bat') |
52 |
52 |
53 data = { |
53 data = { |
54 "programEntry" : True, |
54 "programEntry" : True, |
55 "header" : QApplication.translate("EricapiPlugin", |
55 "header" : QApplication.translate("EricapiPlugin", |
56 "Eric5 API File Generator"), |
56 "Eric5 API File Generator"), |
57 "exe" : exe, |
57 "exe" : exe, |
58 "versionCommand" : '--version', |
58 "versionCommand" : '--version', |
59 "versionStartsWith" : 'eric5-', |
59 "versionStartsWith" : 'eric5_', |
60 "versionPosition" : -3, |
60 "versionPosition" : -3, |
61 "version" : "", |
61 "version" : "", |
62 "versionCleanup" : None, |
62 "versionCleanup" : None, |
63 } |
63 } |
64 |
64 |
90 |
90 |
91 @return tuple of None and activation status (boolean) |
91 @return tuple of None and activation status (boolean) |
92 """ |
92 """ |
93 menu = e5App().getObject("Project").getMenu("Apidoc") |
93 menu = e5App().getObject("Project").getMenu("Apidoc") |
94 if menu: |
94 if menu: |
95 self.__projectAct = E5Action(self.trUtf8('Generate API file (eric5-api)'), |
95 self.__projectAct = E5Action(self.trUtf8('Generate API file (eric5_api)'), |
96 self.trUtf8('Generate &API file (eric5-api)'), 0, 0, |
96 self.trUtf8('Generate &API file (eric5_api)'), 0, 0, |
97 self, 'doc_eric5_api') |
97 self, 'doc_eric5_api') |
98 self.__projectAct.setStatusTip( |
98 self.__projectAct.setStatusTip( |
99 self.trUtf8('Generate an API file using eric5-api')) |
99 self.trUtf8('Generate an API file using eric5_api')) |
100 self.__projectAct.setWhatsThis(self.trUtf8( |
100 self.__projectAct.setWhatsThis(self.trUtf8( |
101 """<b>Generate API file</b>""" |
101 """<b>Generate API file</b>""" |
102 """<p>Generate an API file using eric5-api.</p>""" |
102 """<p>Generate an API file using eric5_api.</p>""" |
103 )) |
103 )) |
104 self.__projectAct.triggered[()].connect(self.__doEricapi) |
104 self.__projectAct.triggered[()].connect(self.__doEricapi) |
105 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
105 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
106 menu.addAction(self.__projectAct) |
106 menu.addAction(self.__projectAct) |
107 |
107 |
135 e5App().getObject("Project").getProjectLanguage() in \ |
135 e5App().getObject("Project").getProjectLanguage() in \ |
136 ["Python", "Python2", "Python3", "Ruby"]) |
136 ["Python", "Python2", "Python3", "Ruby"]) |
137 |
137 |
138 def __doEricapi(self): |
138 def __doEricapi(self): |
139 """ |
139 """ |
140 Private slot to perform the eric5-api api generation. |
140 Private slot to perform the eric5_api api generation. |
141 """ |
141 """ |
142 eolTranslation = { |
142 eolTranslation = { |
143 '\r' : 'cr', |
143 '\r' : 'cr', |
144 '\n' : 'lf', |
144 '\n' : 'lf', |
145 '\r\n' : 'crlf', |
145 '\r\n' : 'crlf', |