46 Public method to support the display of some executable info. |
46 Public method to support the display of some executable info. |
47 |
47 |
48 @return dictionary containing the data to query the presence of |
48 @return dictionary containing the data to query the presence of |
49 the executable |
49 the executable |
50 """ |
50 """ |
51 exe = 'eric5_api' |
51 exe = 'eric6_api' |
52 if Utilities.isWindowsPlatform(): |
52 if Utilities.isWindowsPlatform(): |
53 exe = os.path.join(getConfig("bindir"), exe + '.bat') |
53 exe = os.path.join(getConfig("bindir"), exe + '.bat') |
54 |
54 |
55 data = { |
55 data = { |
56 "programEntry": True, |
56 "programEntry": True, |
57 "header": QCoreApplication.translate( |
57 "header": QCoreApplication.translate( |
58 "EricapiPlugin", "Eric5 API File Generator"), |
58 "EricapiPlugin", "Eric6 API File Generator"), |
59 "exe": exe, |
59 "exe": exe, |
60 "versionCommand": '--version', |
60 "versionCommand": '--version', |
61 "versionStartsWith": 'eric5_', |
61 "versionStartsWith": 'eric6_', |
62 "versionPosition": -3, |
62 "versionPosition": -3, |
63 "version": "", |
63 "version": "", |
64 "versionCleanup": None, |
64 "versionCleanup": None, |
65 } |
65 } |
66 |
66 |
94 @return tuple of None and activation status (boolean) |
94 @return tuple of None and activation status (boolean) |
95 """ |
95 """ |
96 menu = e5App().getObject("Project").getMenu("Apidoc") |
96 menu = e5App().getObject("Project").getMenu("Apidoc") |
97 if menu: |
97 if menu: |
98 self.__projectAct = E5Action( |
98 self.__projectAct = E5Action( |
99 self.tr('Generate API file (eric5_api)'), |
99 self.tr('Generate API file (eric6_api)'), |
100 self.tr('Generate &API file (eric5_api)'), 0, 0, |
100 self.tr('Generate &API file (eric6_api)'), 0, 0, |
101 self, 'doc_eric5_api') |
101 self, 'doc_eric6_api') |
102 self.__projectAct.setStatusTip(self.tr( |
102 self.__projectAct.setStatusTip(self.tr( |
103 'Generate an API file using eric5_api')) |
103 'Generate an API file using eric6_api')) |
104 self.__projectAct.setWhatsThis(self.tr( |
104 self.__projectAct.setWhatsThis(self.tr( |
105 """<b>Generate API file</b>""" |
105 """<b>Generate API file</b>""" |
106 """<p>Generate an API file using eric5_api.</p>""" |
106 """<p>Generate an API file using eric6_api.</p>""" |
107 )) |
107 )) |
108 self.__projectAct.triggered.connect(self.__doEricapi) |
108 self.__projectAct.triggered.connect(self.__doEricapi) |
109 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
109 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
110 menu.addAction(self.__projectAct) |
110 menu.addAction(self.__projectAct) |
111 |
111 |
140 e5App().getObject("Project").getProjectLanguage() in |
140 e5App().getObject("Project").getProjectLanguage() in |
141 ["Python", "Python2", "Python3", "Ruby"]) |
141 ["Python", "Python2", "Python3", "Ruby"]) |
142 |
142 |
143 def __doEricapi(self): |
143 def __doEricapi(self): |
144 """ |
144 """ |
145 Private slot to perform the eric5_api api generation. |
145 Private slot to perform the eric6_api api generation. |
146 """ |
146 """ |
147 from DocumentationPlugins.Ericapi.EricapiConfigDialog import \ |
147 from DocumentationPlugins.Ericapi.EricapiConfigDialog import \ |
148 EricapiConfigDialog |
148 EricapiConfigDialog |
149 eolTranslation = { |
149 eolTranslation = { |
150 '\r': 'cr', |
150 '\r': 'cr', |