eric6/Plugins/PluginEricdoc.py

changeset 7256
4ef3b78ebb4e
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7255:d595f6f9cbf8 7256:4ef3b78ebb4e
29 deactivateable = True 29 deactivateable = True
30 version = UI.Info.VersionOnly 30 version = UI.Info.VersionOnly
31 className = "EricdocPlugin" 31 className = "EricdocPlugin"
32 packageName = "__core__" 32 packageName = "__core__"
33 shortDescription = "Show the Ericdoc dialogs." 33 shortDescription = "Show the Ericdoc dialogs."
34 longDescription = """This plugin implements the Ericdoc dialogs.""" \ 34 longDescription = (
35 """ Ericdoc is used to generate a source code documentation""" \ 35 """This plugin implements the Ericdoc dialogs."""
36 """ Ericdoc is used to generate a source code documentation"""
36 """ for Python and Ruby projects.""" 37 """ for Python and Ruby projects."""
38 )
37 pyqtApi = 2 39 pyqtApi = 2
38 # End-Of-Header 40 # End-Of-Header
39 41
40 error = "" 42 error = ""
41 43
138 140
139 @return tuple of None and activation status (boolean) 141 @return tuple of None and activation status (boolean)
140 """ 142 """
141 menu = e5App().getObject("Project").getMenu("Apidoc") 143 menu = e5App().getObject("Project").getMenu("Apidoc")
142 if menu: 144 if menu:
143 self.__projectAct = \ 145 self.__projectAct = E5Action(
144 E5Action( 146 self.tr('Generate documentation (eric6_doc)'),
145 self.tr('Generate documentation (eric6_doc)'), 147 self.tr('Generate &documentation (eric6_doc)'), 0, 0,
146 self.tr('Generate &documentation (eric6_doc)'), 0, 0, 148 self, 'doc_eric6_doc')
147 self, 'doc_eric6_doc')
148 self.__projectAct.setStatusTip( 149 self.__projectAct.setStatusTip(
149 self.tr('Generate API documentation using eric6_doc')) 150 self.tr('Generate API documentation using eric6_doc'))
150 self.__projectAct.setWhatsThis(self.tr( 151 self.__projectAct.setWhatsThis(self.tr(
151 """<b>Generate documentation</b>""" 152 """<b>Generate documentation</b>"""
152 """<p>Generate API documentation using eric6_doc.</p>""" 153 """<p>Generate API documentation using eric6_doc.</p>"""
188 189
189 def __doEricdoc(self): 190 def __doEricdoc(self):
190 """ 191 """
191 Private slot to perform the eric6_doc api documentation generation. 192 Private slot to perform the eric6_doc api documentation generation.
192 """ 193 """
193 from DocumentationPlugins.Ericdoc.EricdocConfigDialog import \ 194 from DocumentationPlugins.Ericdoc.EricdocConfigDialog import (
194 EricdocConfigDialog 195 EricdocConfigDialog
196 )
195 eolTranslation = { 197 eolTranslation = {
196 '\r': 'cr', 198 '\r': 'cr',
197 '\n': 'lf', 199 '\n': 'lf',
198 '\r\n': 'crlf', 200 '\r\n': 'crlf',
199 } 201 }
208 if not project.useSystemEol(): 210 if not project.useSystemEol():
209 args.append( 211 args.append(
210 "--eol={0}".format(eolTranslation[project.getEolString()])) 212 "--eol={0}".format(eolTranslation[project.getEolString()]))
211 213
212 # now do the call 214 # now do the call
213 from DocumentationPlugins.Ericdoc.EricdocExecDialog import \ 215 from DocumentationPlugins.Ericdoc.EricdocExecDialog import (
214 EricdocExecDialog 216 EricdocExecDialog
217 )
215 dia = EricdocExecDialog("Ericdoc") 218 dia = EricdocExecDialog("Ericdoc")
216 res = dia.start(args, project.ppath) 219 res = dia.start(args, project.ppath)
217 if res: 220 if res:
218 dia.exec_() 221 dia.exec_()
219 222

eric ide

mercurial