Plugins/PluginEricdoc.py

changeset 248
f4561c24989a
parent 96
9624a110667d
child 253
3ccdf551bde7
equal deleted inserted replaced
247:b3da30a52337 248:f4561c24989a
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the Ericdoc plugin. 7 Module implementing the Ericdoc plugin.
8 """ 8 """
9
10 import os
11 9
12 from PyQt4.QtCore import QObject, SIGNAL 10 from PyQt4.QtCore import QObject, SIGNAL
13 from PyQt4.QtGui import QDialog, QApplication 11 from PyQt4.QtGui import QDialog, QApplication
14 12
15 from E5Gui.E5Application import e5App 13 from E5Gui.E5Application import e5App
141 """ 139 """
142 Private slot to perform the eric5-doc api documentation generation. 140 Private slot to perform the eric5-doc api documentation generation.
143 """ 141 """
144 project = e5App().getObject("Project") 142 project = e5App().getObject("Project")
145 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4DOC") 143 parms = project.getData('DOCUMENTATIONPARMS', "ERIC4DOC")
146 dlg = EricdocConfigDialog(project.getProjectPath(), parms) 144 dlg = EricdocConfigDialog(project, parms)
147 if dlg.exec_() == QDialog.Accepted: 145 if dlg.exec_() == QDialog.Accepted:
148 args, parms = dlg.generateParameters() 146 args, parms = dlg.generateParameters()
149 project.setData('DOCUMENTATIONPARMS', "ERIC4DOC", parms) 147 project.setData('DOCUMENTATIONPARMS', "ERIC4DOC", parms)
150 148
151 # now do the call 149 # now do the call
157 outdir = parms['outputDirectory'] 155 outdir = parms['outputDirectory']
158 if outdir == '': 156 if outdir == '':
159 outdir = 'doc' # that is eric5-docs default output dir 157 outdir = 'doc' # that is eric5-docs default output dir
160 158
161 # add it to the project data, if it isn't in already 159 # add it to the project data, if it isn't in already
162 outdir = outdir.replace(project.ppath+os.sep, '') 160 outdir = project.getRelativePath(outdir)
163 if outdir not in project.pdata['OTHERS']: 161 if outdir not in project.pdata['OTHERS']:
164 project.pdata['OTHERS'].append(outdir) 162 project.pdata['OTHERS'].append(outdir)
165 project.setDirty(True) 163 project.setDirty(True)
166 project.othersAdded(outdir) 164 project.othersAdded(outdir)
167 165
169 outdir = parms['qtHelpOutputDirectory'] 167 outdir = parms['qtHelpOutputDirectory']
170 if outdir == '': 168 if outdir == '':
171 outdir = 'help' # that is eric5-docs default QtHelp output dir 169 outdir = 'help' # that is eric5-docs default QtHelp output dir
172 170
173 # add it to the project data, if it isn't in already 171 # add it to the project data, if it isn't in already
174 outdir = outdir.replace(project.ppath+os.sep, '') 172 outdir = project.getRelativePath(outdir)
175 if outdir not in project.pdata['OTHERS']: 173 if outdir not in project.pdata['OTHERS']:
176 project.pdata['OTHERS'].append(outdir) 174 project.pdata['OTHERS'].append(outdir)
177 project.setDirty(True) 175 project.setDirty(True)
178 project.othersAdded(outdir) 176 project.othersAdded(outdir)

eric ide

mercurial