45 Public method to support the display of some executable info. |
45 Public method to support the display of some executable info. |
46 |
46 |
47 @return dictionary containing the data to query the presence of |
47 @return dictionary containing the data to query the presence of |
48 the executable |
48 the executable |
49 """ |
49 """ |
50 exe = 'eric4-doc' |
50 exe = 'eric5-doc' |
51 if Utilities.isWindowsPlatform(): |
51 if Utilities.isWindowsPlatform(): |
52 exe += '.bat' |
52 exe += '.bat' |
53 |
53 |
54 data = { |
54 data = { |
55 "programEntry" : True, |
55 "programEntry" : True, |
56 "header" : QApplication.translate("EricdocPlugin", |
56 "header" : QApplication.translate("EricdocPlugin", |
57 "Eric4 Documentation Generator"), |
57 "Eric4 Documentation Generator"), |
58 "exe" : exe, |
58 "exe" : exe, |
59 "versionCommand" : '--version', |
59 "versionCommand" : '--version', |
60 "versionStartsWith" : 'eric4-', |
60 "versionStartsWith" : 'eric5-', |
61 "versionPosition" : -2, |
61 "versionPosition" : -2, |
62 "version" : "", |
62 "version" : "", |
63 "versionCleanup" : None, |
63 "versionCleanup" : None, |
64 } |
64 } |
65 |
65 |
92 @return tuple of None and activation status (boolean) |
92 @return tuple of None and activation status (boolean) |
93 """ |
93 """ |
94 menu = e4App().getObject("Project").getMenu("Apidoc") |
94 menu = e4App().getObject("Project").getMenu("Apidoc") |
95 if menu: |
95 if menu: |
96 self.__projectAct = \ |
96 self.__projectAct = \ |
97 E4Action(self.trUtf8('Generate documentation (eric4-doc)'), |
97 E4Action(self.trUtf8('Generate documentation (eric5-doc)'), |
98 self.trUtf8('Generate &documentation (eric4-doc)'), 0, 0, |
98 self.trUtf8('Generate &documentation (eric5-doc)'), 0, 0, |
99 self, 'doc_eric4_doc') |
99 self, 'doc_eric5_doc') |
100 self.__projectAct.setStatusTip(\ |
100 self.__projectAct.setStatusTip(\ |
101 self.trUtf8('Generate API documentation using eric4-doc')) |
101 self.trUtf8('Generate API documentation using eric5-doc')) |
102 self.__projectAct.setWhatsThis(self.trUtf8( |
102 self.__projectAct.setWhatsThis(self.trUtf8( |
103 """<b>Generate documentation</b>""" |
103 """<b>Generate documentation</b>""" |
104 """<p>Generate API documentation using eric4-doc.</p>""" |
104 """<p>Generate API documentation using eric5-doc.</p>""" |
105 )) |
105 )) |
106 self.connect(self.__projectAct, SIGNAL('triggered()'), self.__doEricdoc) |
106 self.connect(self.__projectAct, SIGNAL('triggered()'), self.__doEricdoc) |
107 e4App().getObject("Project").addE4Actions([self.__projectAct]) |
107 e4App().getObject("Project").addE4Actions([self.__projectAct]) |
108 menu.addAction(self.__projectAct) |
108 menu.addAction(self.__projectAct) |
109 |
109 |
139 e4App().getObject("Project").getProjectLanguage() in \ |
139 e4App().getObject("Project").getProjectLanguage() in \ |
140 ["Python", "Python3", "Ruby"]) |
140 ["Python", "Python3", "Ruby"]) |
141 |
141 |
142 def __doEricdoc(self): |
142 def __doEricdoc(self): |
143 """ |
143 """ |
144 Private slot to perform the eric4-doc api documentation generation. |
144 Private slot to perform the eric5-doc api documentation generation. |
145 """ |
145 """ |
146 project = e4App().getObject("Project") |
146 project = e4App().getObject("Project") |
147 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4DOC") |
147 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4DOC") |
148 dlg = EricdocConfigDialog(project.getProjectPath(), parms) |
148 dlg = EricdocConfigDialog(project.getProjectPath(), parms) |
149 if dlg.exec_() == QDialog.Accepted: |
149 if dlg.exec_() == QDialog.Accepted: |
156 if res: |
156 if res: |
157 dia.exec_() |
157 dia.exec_() |
158 |
158 |
159 outdir = parms['outputDirectory'] |
159 outdir = parms['outputDirectory'] |
160 if outdir == '': |
160 if outdir == '': |
161 outdir = 'doc' # that is eric4-docs default output dir |
161 outdir = 'doc' # that is eric5-docs default output dir |
162 |
162 |
163 # add it to the project data, if it isn't in already |
163 # add it to the project data, if it isn't in already |
164 outdir = outdir.replace(project.ppath+os.sep, '') |
164 outdir = outdir.replace(project.ppath+os.sep, '') |
165 if outdir not in project.pdata['OTHERS']: |
165 if outdir not in project.pdata['OTHERS']: |
166 project.pdata['OTHERS'].append(outdir) |
166 project.pdata['OTHERS'].append(outdir) |
168 project.othersAdded(outdir) |
168 project.othersAdded(outdir) |
169 |
169 |
170 if parms['qtHelpEnabled']: |
170 if parms['qtHelpEnabled']: |
171 outdir = parms['qtHelpOutputDirectory'] |
171 outdir = parms['qtHelpOutputDirectory'] |
172 if outdir == '': |
172 if outdir == '': |
173 outdir = 'help' # that is eric4-docs default QtHelp output dir |
173 outdir = 'help' # that is eric5-docs default QtHelp output dir |
174 |
174 |
175 # add it to the project data, if it isn't in already |
175 # add it to the project data, if it isn't in already |
176 outdir = outdir.replace(project.ppath+os.sep, '') |
176 outdir = outdir.replace(project.ppath+os.sep, '') |
177 if outdir not in project.pdata['OTHERS']: |
177 if outdir not in project.pdata['OTHERS']: |
178 project.pdata['OTHERS'].append(outdir) |
178 project.pdata['OTHERS'].append(outdir) |