|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>Plugin_Refactoring_Rope.RefactoringRope.Refactoring</title> |
|
6 <style> |
|
7 body { |
|
8 background: #EDECE6; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #85774A; } |
|
14 h2 { color: white; background: #85774A; } |
|
15 h3 { color: white; background: #9D936E; } |
|
16 h4 { color: white; background: #9D936E; } |
|
17 |
|
18 a { color: #BA6D36; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>Plugin_Refactoring_Rope.RefactoringRope.Refactoring</h1> |
|
24 <p> |
|
25 Module implementing the refactoring interface to rope. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#Refactoring">Refactoring</a></td> |
|
35 <td>Class implementing the refactoring interface to rope.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="Refactoring" ID="Refactoring"></a> |
|
44 <h2>Refactoring</h2> |
|
45 <p> |
|
46 Class implementing the refactoring interface to rope. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QObject |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 <h3>Methods</h3> |
|
55 <table> |
|
56 <tr> |
|
57 <td><a href="#Refactoring.__init__">Refactoring</a></td> |
|
58 <td>Constructor</td> |
|
59 </tr><tr> |
|
60 <td><a href="#Refactoring.__canRedo">__canRedo</a></td> |
|
61 <td>Private slot to check, if there are changes to be redone.</td> |
|
62 </tr><tr> |
|
63 <td><a href="#Refactoring.__canRedoFile">__canRedoFile</a></td> |
|
64 <td>Private slot to check, if there are redoable changes for a resource.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#Refactoring.__canUndo">__canUndo</a></td> |
|
67 <td>Private slot to check, if there are changes to be undone.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#Refactoring.__canUndoFile">__canUndoFile</a></td> |
|
70 <td>Private slot to check, if there are undoable changes for a resource.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#Refactoring.__changeOccurrences">__changeOccurrences</a></td> |
|
73 <td>Private slot to perform the Change Occurrences refactoring.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#Refactoring.__changeSignature">__changeSignature</a></td> |
|
76 <td>Private slot to change the signature of a method or function.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#Refactoring.__clearHistory">__clearHistory</a></td> |
|
79 <td>Private slot to clear the redo and undo lists.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#Refactoring.__configChanged">__configChanged</a></td> |
|
82 <td>Private slot called, when the rope config file has changed.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#Refactoring.__convertLocalToAttribute">__convertLocalToAttribute</a></td> |
|
85 <td>Private slot to convert a local variable to an attribute.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#Refactoring.__defaultConfig">__defaultConfig</a></td> |
|
88 <td>Private slot to return the contents of rope's default configuration.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#Refactoring.__doExtract">__doExtract</a></td> |
|
91 <td>Private method to perform the extract refactoring.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#Refactoring.__doImports">__doImports</a></td> |
|
94 <td>Private method to perform the various imports refactorings.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#Refactoring.__doRename">__doRename</a></td> |
|
97 <td>Private method to perform the various renaming refactorings.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#Refactoring.__editConfig">__editConfig</a></td> |
|
100 <td>Private slot to open the rope configuration file in an editor.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#Refactoring.__encapsulateAttribute">__encapsulateAttribute</a></td> |
|
103 <td>Private slot to encapsulate an attribute.</td> |
|
104 </tr><tr> |
|
105 <td><a href="#Refactoring.__extractLocalVariable">__extractLocalVariable</a></td> |
|
106 <td>Private slot to handle the Extract Local Variable action.</td> |
|
107 </tr><tr> |
|
108 <td><a href="#Refactoring.__extractMethod">__extractMethod</a></td> |
|
109 <td>Private slot to handle the Extract Method action.</td> |
|
110 </tr><tr> |
|
111 <td><a href="#Refactoring.__getFileRedoList">__getFileRedoList</a></td> |
|
112 <td>Private slot to get a list of redoable changes.</td> |
|
113 </tr><tr> |
|
114 <td><a href="#Refactoring.__getFileUndoList">__getFileUndoList</a></td> |
|
115 <td>Private slot to get a list of undoable changes.</td> |
|
116 </tr><tr> |
|
117 <td><a href="#Refactoring.__importsExpandStar">__importsExpandStar</a></td> |
|
118 <td>Private slot to expand star imports.</td> |
|
119 </tr><tr> |
|
120 <td><a href="#Refactoring.__importsFromToImport">__importsFromToImport</a></td> |
|
121 <td>Private slot to transform from imports to plain imports.</td> |
|
122 </tr><tr> |
|
123 <td><a href="#Refactoring.__importsHandleLong">__importsHandleLong</a></td> |
|
124 <td>Private slot to handle long imports.</td> |
|
125 </tr><tr> |
|
126 <td><a href="#Refactoring.__importsOrganize">__importsOrganize</a></td> |
|
127 <td>Private slot to organize imports.</td> |
|
128 </tr><tr> |
|
129 <td><a href="#Refactoring.__importsRelativeToAbsolute">__importsRelativeToAbsolute</a></td> |
|
130 <td>Private slot to transform relative to absolute imports.</td> |
|
131 </tr><tr> |
|
132 <td><a href="#Refactoring.__inline">__inline</a></td> |
|
133 <td>Private slot to handle the Inline Local Variable action.</td> |
|
134 </tr><tr> |
|
135 <td><a href="#Refactoring.__inlineArgumentDefault">__inlineArgumentDefault</a></td> |
|
136 <td>Private slot to inline the default value of a parameter of a method or function.</td> |
|
137 </tr><tr> |
|
138 <td><a href="#Refactoring.__introduceFactoryMethod">__introduceFactoryMethod</a></td> |
|
139 <td>Private slot to introduce a factory method or global function.</td> |
|
140 </tr><tr> |
|
141 <td><a href="#Refactoring.__introduceParameter">__introduceParameter</a></td> |
|
142 <td>Private slot to introduce a parameter in a function.</td> |
|
143 </tr><tr> |
|
144 <td><a href="#Refactoring.__methodToMethodObject">__methodToMethodObject</a></td> |
|
145 <td>Private slot to change the signature of a method or function.</td> |
|
146 </tr><tr> |
|
147 <td><a href="#Refactoring.__moveMethod">__moveMethod</a></td> |
|
148 <td>Private slot to handle the Move Method action.</td> |
|
149 </tr><tr> |
|
150 <td><a href="#Refactoring.__moveModule">__moveModule</a></td> |
|
151 <td>Private slot to handle the Move Current Module action.</td> |
|
152 </tr><tr> |
|
153 <td><a href="#Refactoring.__performSOA">__performSOA</a></td> |
|
154 <td>Private slot to perform SOA on all modules.</td> |
|
155 </tr><tr> |
|
156 <td><a href="#Refactoring.__queryDefinition">__queryDefinition</a></td> |
|
157 <td>Private slot to handle the Find Definition action</td> |
|
158 </tr><tr> |
|
159 <td><a href="#Refactoring.__queryImplementations">__queryImplementations</a></td> |
|
160 <td>Private slot to handle the Find Implementations action.</td> |
|
161 </tr><tr> |
|
162 <td><a href="#Refactoring.__queryReferences">__queryReferences</a></td> |
|
163 <td>Private slot to handle the Find References action.</td> |
|
164 </tr><tr> |
|
165 <td><a href="#Refactoring.__redo">__redo</a></td> |
|
166 <td>Private slot to redo the last refactoring.</td> |
|
167 </tr><tr> |
|
168 <td><a href="#Refactoring.__rename">__rename</a></td> |
|
169 <td>Private slot to handle the Rename action.</td> |
|
170 </tr><tr> |
|
171 <td><a href="#Refactoring.__renameLocal">__renameLocal</a></td> |
|
172 <td>Private slot to handle the Local Rename action.</td> |
|
173 </tr><tr> |
|
174 <td><a href="#Refactoring.__renameModule">__renameModule</a></td> |
|
175 <td>Private slot to handle the Rename Current Module action.</td> |
|
176 </tr><tr> |
|
177 <td><a href="#Refactoring.__restructure">__restructure</a></td> |
|
178 <td>Private slot to restructure code.</td> |
|
179 </tr><tr> |
|
180 <td><a href="#Refactoring.__ropeConfigFile">__ropeConfigFile</a></td> |
|
181 <td>Private method to get the name of the rope configuration file.</td> |
|
182 </tr><tr> |
|
183 <td><a href="#Refactoring.__ropeInfo">__ropeInfo</a></td> |
|
184 <td>Private slot to show some info about rope.</td> |
|
185 </tr><tr> |
|
186 <td><a href="#Refactoring.__showFileRedoHistory">__showFileRedoHistory</a></td> |
|
187 <td>Private method to show list of changes related to the current file available for a redo operation.</td> |
|
188 </tr><tr> |
|
189 <td><a href="#Refactoring.__showFileUndoHistory">__showFileUndoHistory</a></td> |
|
190 <td>Private method to show list of changes related to the current file available for an undo operation.</td> |
|
191 </tr><tr> |
|
192 <td><a href="#Refactoring.__showProjectRedoHistory">__showProjectRedoHistory</a></td> |
|
193 <td>Private method to show list of changes available for a redo operation.</td> |
|
194 </tr><tr> |
|
195 <td><a href="#Refactoring.__showProjectUndoHistory">__showProjectUndoHistory</a></td> |
|
196 <td>Private method to show list of changes available for an undo operation.</td> |
|
197 </tr><tr> |
|
198 <td><a href="#Refactoring.__showRefactoringHistoryMenu">__showRefactoringHistoryMenu</a></td> |
|
199 <td>Private slot called before the refactoring history menu is shown.</td> |
|
200 </tr><tr> |
|
201 <td><a href="#Refactoring.__showRefactoringMenu">__showRefactoringMenu</a></td> |
|
202 <td>Private slot called before the refactoring menu is shown.</td> |
|
203 </tr><tr> |
|
204 <td><a href="#Refactoring.__showRopeHelp">__showRopeHelp</a></td> |
|
205 <td>Private slot to show help about the refactorings offered by Rope.</td> |
|
206 </tr><tr> |
|
207 <td><a href="#Refactoring.__transformModuleToPackage">__transformModuleToPackage</a></td> |
|
208 <td>Private slot to transform a module to a package.</td> |
|
209 </tr><tr> |
|
210 <td><a href="#Refactoring.__undo">__undo</a></td> |
|
211 <td>Private slot to undo the last refactoring.</td> |
|
212 </tr><tr> |
|
213 <td><a href="#Refactoring.__updateConfig">__updateConfig</a></td> |
|
214 <td>Private slot to update the configuration file.</td> |
|
215 </tr><tr> |
|
216 <td><a href="#Refactoring.__useFunction">__useFunction</a></td> |
|
217 <td>Private slot to use a function wherever possible.</td> |
|
218 </tr><tr> |
|
219 <td><a href="#Refactoring.confirmAllBuffersSaved">confirmAllBuffersSaved</a></td> |
|
220 <td>Private method to check, if any editor has unsaved changes.</td> |
|
221 </tr><tr> |
|
222 <td><a href="#Refactoring.confirmBufferIsSaved">confirmBufferIsSaved</a></td> |
|
223 <td>Public method to check, if an editor has unsaved changes.</td> |
|
224 </tr><tr> |
|
225 <td><a href="#Refactoring.getActions">getActions</a></td> |
|
226 <td>Public method to get a list of all actions.</td> |
|
227 </tr><tr> |
|
228 <td><a href="#Refactoring.getProject">getProject</a></td> |
|
229 <td>Public method to get a reference to the rope project object.</td> |
|
230 </tr><tr> |
|
231 <td><a href="#Refactoring.handleRopeError">handleRopeError</a></td> |
|
232 <td>Public slot to handle a rope error.</td> |
|
233 </tr><tr> |
|
234 <td><a href="#Refactoring.initActions">initActions</a></td> |
|
235 <td>Public method to define the refactoring actions.</td> |
|
236 </tr><tr> |
|
237 <td><a href="#Refactoring.initMenu">initMenu</a></td> |
|
238 <td>Public slot to initialize the refactoring menu.</td> |
|
239 </tr><tr> |
|
240 <td><a href="#Refactoring.projectClosed">projectClosed</a></td> |
|
241 <td>Public slot to handle the projectClosed signal.</td> |
|
242 </tr><tr> |
|
243 <td><a href="#Refactoring.projectOpened">projectOpened</a></td> |
|
244 <td>Public slot to handle the projectOpened signal.</td> |
|
245 </tr><tr> |
|
246 <td><a href="#Refactoring.refreshEditors">refreshEditors</a></td> |
|
247 <td>Public method to refresh modified editors.</td> |
|
248 </tr> |
|
249 </table> |
|
250 <a NAME="Refactoring.__init__" ID="Refactoring.__init__"></a> |
|
251 <h4>Refactoring (Constructor)</h4> |
|
252 <b>Refactoring</b>(<i>plugin, newStyle, parent=None</i>) |
|
253 <p> |
|
254 Constructor |
|
255 </p><dl> |
|
256 <dt><i>plugin</i></dt> |
|
257 <dd> |
|
258 reference to the plugin object |
|
259 </dd><dt><i>newStyle</i></dt> |
|
260 <dd> |
|
261 flag indicating usage of new style signals (bool) |
|
262 </dd><dt><i>parent</i></dt> |
|
263 <dd> |
|
264 parent (QObject) |
|
265 </dd> |
|
266 </dl><a NAME="Refactoring.__canRedo" ID="Refactoring.__canRedo"></a> |
|
267 <h4>Refactoring.__canRedo</h4> |
|
268 <b>__canRedo</b>(<i></i>) |
|
269 <p> |
|
270 Private slot to check, if there are changes to be redone. |
|
271 </p><dl> |
|
272 <dt>Returns:</dt> |
|
273 <dd> |
|
274 flag indicating, that redoable changes are available (boolean) |
|
275 </dd> |
|
276 </dl><a NAME="Refactoring.__canRedoFile" ID="Refactoring.__canRedoFile"></a> |
|
277 <h4>Refactoring.__canRedoFile</h4> |
|
278 <b>__canRedoFile</b>(<i>resource</i>) |
|
279 <p> |
|
280 Private slot to check, if there are redoable changes for a resource. |
|
281 </p><dl> |
|
282 <dt><i>resource</i></dt> |
|
283 <dd> |
|
284 file resource to check against |
|
285 (rope.base.resources.File) |
|
286 </dd> |
|
287 </dl><dl> |
|
288 <dt>Returns:</dt> |
|
289 <dd> |
|
290 flag indicating, that redoable changes are available (boolean) |
|
291 </dd> |
|
292 </dl><a NAME="Refactoring.__canUndo" ID="Refactoring.__canUndo"></a> |
|
293 <h4>Refactoring.__canUndo</h4> |
|
294 <b>__canUndo</b>(<i></i>) |
|
295 <p> |
|
296 Private slot to check, if there are changes to be undone. |
|
297 </p><dl> |
|
298 <dt>Returns:</dt> |
|
299 <dd> |
|
300 flag indicating, that undoable changes are available (boolean) |
|
301 </dd> |
|
302 </dl><a NAME="Refactoring.__canUndoFile" ID="Refactoring.__canUndoFile"></a> |
|
303 <h4>Refactoring.__canUndoFile</h4> |
|
304 <b>__canUndoFile</b>(<i>resource</i>) |
|
305 <p> |
|
306 Private slot to check, if there are undoable changes for a resource. |
|
307 </p><dl> |
|
308 <dt><i>resource</i></dt> |
|
309 <dd> |
|
310 file resource to check against |
|
311 (rope.base.resources.File) |
|
312 </dd> |
|
313 </dl><dl> |
|
314 <dt>Returns:</dt> |
|
315 <dd> |
|
316 flag indicating, that undoable changes are available (boolean) |
|
317 </dd> |
|
318 </dl><a NAME="Refactoring.__changeOccurrences" ID="Refactoring.__changeOccurrences"></a> |
|
319 <h4>Refactoring.__changeOccurrences</h4> |
|
320 <b>__changeOccurrences</b>(<i></i>) |
|
321 <p> |
|
322 Private slot to perform the Change Occurrences refactoring. |
|
323 </p><a NAME="Refactoring.__changeSignature" ID="Refactoring.__changeSignature"></a> |
|
324 <h4>Refactoring.__changeSignature</h4> |
|
325 <b>__changeSignature</b>(<i></i>) |
|
326 <p> |
|
327 Private slot to change the signature of a method or function. |
|
328 </p><a NAME="Refactoring.__clearHistory" ID="Refactoring.__clearHistory"></a> |
|
329 <h4>Refactoring.__clearHistory</h4> |
|
330 <b>__clearHistory</b>(<i></i>) |
|
331 <p> |
|
332 Private slot to clear the redo and undo lists. |
|
333 </p><a NAME="Refactoring.__configChanged" ID="Refactoring.__configChanged"></a> |
|
334 <h4>Refactoring.__configChanged</h4> |
|
335 <b>__configChanged</b>(<i></i>) |
|
336 <p> |
|
337 Private slot called, when the rope config file has changed. |
|
338 </p><a NAME="Refactoring.__convertLocalToAttribute" ID="Refactoring.__convertLocalToAttribute"></a> |
|
339 <h4>Refactoring.__convertLocalToAttribute</h4> |
|
340 <b>__convertLocalToAttribute</b>(<i></i>) |
|
341 <p> |
|
342 Private slot to convert a local variable to an attribute. |
|
343 </p><a NAME="Refactoring.__defaultConfig" ID="Refactoring.__defaultConfig"></a> |
|
344 <h4>Refactoring.__defaultConfig</h4> |
|
345 <b>__defaultConfig</b>(<i></i>) |
|
346 <p> |
|
347 Private slot to return the contents of rope's default configuration. |
|
348 </p><dl> |
|
349 <dt>Returns:</dt> |
|
350 <dd> |
|
351 string containing the source of rope's default |
|
352 configuration (string) |
|
353 </dd> |
|
354 </dl><a NAME="Refactoring.__doExtract" ID="Refactoring.__doExtract"></a> |
|
355 <h4>Refactoring.__doExtract</h4> |
|
356 <b>__doExtract</b>(<i>title, kind</i>) |
|
357 <p> |
|
358 Private method to perform the extract refactoring. |
|
359 </p><dl> |
|
360 <dt><i>title</i></dt> |
|
361 <dd> |
|
362 title of the refactoring (string) |
|
363 </dd><dt><i>kind</i></dt> |
|
364 <dd> |
|
365 kind of extraction to be done (string, |
|
366 "method" or "variable") |
|
367 </dd> |
|
368 </dl><a NAME="Refactoring.__doImports" ID="Refactoring.__doImports"></a> |
|
369 <h4>Refactoring.__doImports</h4> |
|
370 <b>__doImports</b>(<i>title, method</i>) |
|
371 <p> |
|
372 Private method to perform the various imports refactorings. |
|
373 </p><a NAME="Refactoring.__doRename" ID="Refactoring.__doRename"></a> |
|
374 <h4>Refactoring.__doRename</h4> |
|
375 <b>__doRename</b>(<i>title, isLocal=False, renameModule=False</i>) |
|
376 <p> |
|
377 Private method to perform the various renaming refactorings. |
|
378 </p><dl> |
|
379 <dt><i>title</i></dt> |
|
380 <dd> |
|
381 title of the refactoring (string) |
|
382 </dd><dt><i>isLocal</i></dt> |
|
383 <dd> |
|
384 flag indicating to restrict refactoring to |
|
385 the local file (boolean) |
|
386 </dd><dt><i>renameModule</i></dt> |
|
387 <dd> |
|
388 flag indicating a module rename refactoring |
|
389 (boolean) |
|
390 </dd> |
|
391 </dl><a NAME="Refactoring.__editConfig" ID="Refactoring.__editConfig"></a> |
|
392 <h4>Refactoring.__editConfig</h4> |
|
393 <b>__editConfig</b>(<i></i>) |
|
394 <p> |
|
395 Private slot to open the rope configuration file in an editor. |
|
396 </p><a NAME="Refactoring.__encapsulateAttribute" ID="Refactoring.__encapsulateAttribute"></a> |
|
397 <h4>Refactoring.__encapsulateAttribute</h4> |
|
398 <b>__encapsulateAttribute</b>(<i></i>) |
|
399 <p> |
|
400 Private slot to encapsulate an attribute. |
|
401 </p><a NAME="Refactoring.__extractLocalVariable" ID="Refactoring.__extractLocalVariable"></a> |
|
402 <h4>Refactoring.__extractLocalVariable</h4> |
|
403 <b>__extractLocalVariable</b>(<i></i>) |
|
404 <p> |
|
405 Private slot to handle the Extract Local Variable action. |
|
406 </p><a NAME="Refactoring.__extractMethod" ID="Refactoring.__extractMethod"></a> |
|
407 <h4>Refactoring.__extractMethod</h4> |
|
408 <b>__extractMethod</b>(<i></i>) |
|
409 <p> |
|
410 Private slot to handle the Extract Method action. |
|
411 </p><a NAME="Refactoring.__getFileRedoList" ID="Refactoring.__getFileRedoList"></a> |
|
412 <h4>Refactoring.__getFileRedoList</h4> |
|
413 <b>__getFileRedoList</b>(<i>resource</i>) |
|
414 <p> |
|
415 Private slot to get a list of redoable changes. |
|
416 </p><dl> |
|
417 <dt><i>resource</i></dt> |
|
418 <dd> |
|
419 file resource to filter against |
|
420 (rope.base.resources.File) |
|
421 </dd> |
|
422 </dl><dl> |
|
423 <dt>Returns:</dt> |
|
424 <dd> |
|
425 list of change objects (list of rope.base.change.Change) |
|
426 </dd> |
|
427 </dl><a NAME="Refactoring.__getFileUndoList" ID="Refactoring.__getFileUndoList"></a> |
|
428 <h4>Refactoring.__getFileUndoList</h4> |
|
429 <b>__getFileUndoList</b>(<i>resource</i>) |
|
430 <p> |
|
431 Private slot to get a list of undoable changes. |
|
432 </p><dl> |
|
433 <dt><i>resource</i></dt> |
|
434 <dd> |
|
435 file resource to filter against |
|
436 (rope.base.resources.File) |
|
437 </dd> |
|
438 </dl><dl> |
|
439 <dt>Returns:</dt> |
|
440 <dd> |
|
441 list of change objects (list of rope.base.change.Change) |
|
442 </dd> |
|
443 </dl><a NAME="Refactoring.__importsExpandStar" ID="Refactoring.__importsExpandStar"></a> |
|
444 <h4>Refactoring.__importsExpandStar</h4> |
|
445 <b>__importsExpandStar</b>(<i></i>) |
|
446 <p> |
|
447 Private slot to expand star imports. |
|
448 </p><a NAME="Refactoring.__importsFromToImport" ID="Refactoring.__importsFromToImport"></a> |
|
449 <h4>Refactoring.__importsFromToImport</h4> |
|
450 <b>__importsFromToImport</b>(<i></i>) |
|
451 <p> |
|
452 Private slot to transform from imports to plain imports. |
|
453 </p><a NAME="Refactoring.__importsHandleLong" ID="Refactoring.__importsHandleLong"></a> |
|
454 <h4>Refactoring.__importsHandleLong</h4> |
|
455 <b>__importsHandleLong</b>(<i></i>) |
|
456 <p> |
|
457 Private slot to handle long imports. |
|
458 </p><a NAME="Refactoring.__importsOrganize" ID="Refactoring.__importsOrganize"></a> |
|
459 <h4>Refactoring.__importsOrganize</h4> |
|
460 <b>__importsOrganize</b>(<i></i>) |
|
461 <p> |
|
462 Private slot to organize imports. |
|
463 </p><a NAME="Refactoring.__importsRelativeToAbsolute" ID="Refactoring.__importsRelativeToAbsolute"></a> |
|
464 <h4>Refactoring.__importsRelativeToAbsolute</h4> |
|
465 <b>__importsRelativeToAbsolute</b>(<i></i>) |
|
466 <p> |
|
467 Private slot to transform relative to absolute imports. |
|
468 </p><a NAME="Refactoring.__inline" ID="Refactoring.__inline"></a> |
|
469 <h4>Refactoring.__inline</h4> |
|
470 <b>__inline</b>(<i></i>) |
|
471 <p> |
|
472 Private slot to handle the Inline Local Variable action. |
|
473 </p><a NAME="Refactoring.__inlineArgumentDefault" ID="Refactoring.__inlineArgumentDefault"></a> |
|
474 <h4>Refactoring.__inlineArgumentDefault</h4> |
|
475 <b>__inlineArgumentDefault</b>(<i></i>) |
|
476 <p> |
|
477 Private slot to inline the default value of a parameter of a |
|
478 method or function. |
|
479 </p><a NAME="Refactoring.__introduceFactoryMethod" ID="Refactoring.__introduceFactoryMethod"></a> |
|
480 <h4>Refactoring.__introduceFactoryMethod</h4> |
|
481 <b>__introduceFactoryMethod</b>(<i></i>) |
|
482 <p> |
|
483 Private slot to introduce a factory method or global function. |
|
484 </p><a NAME="Refactoring.__introduceParameter" ID="Refactoring.__introduceParameter"></a> |
|
485 <h4>Refactoring.__introduceParameter</h4> |
|
486 <b>__introduceParameter</b>(<i></i>) |
|
487 <p> |
|
488 Private slot to introduce a parameter in a function. |
|
489 </p><a NAME="Refactoring.__methodToMethodObject" ID="Refactoring.__methodToMethodObject"></a> |
|
490 <h4>Refactoring.__methodToMethodObject</h4> |
|
491 <b>__methodToMethodObject</b>(<i></i>) |
|
492 <p> |
|
493 Private slot to change the signature of a method or function. |
|
494 </p><a NAME="Refactoring.__moveMethod" ID="Refactoring.__moveMethod"></a> |
|
495 <h4>Refactoring.__moveMethod</h4> |
|
496 <b>__moveMethod</b>(<i></i>) |
|
497 <p> |
|
498 Private slot to handle the Move Method action. |
|
499 </p><a NAME="Refactoring.__moveModule" ID="Refactoring.__moveModule"></a> |
|
500 <h4>Refactoring.__moveModule</h4> |
|
501 <b>__moveModule</b>(<i></i>) |
|
502 <p> |
|
503 Private slot to handle the Move Current Module action. |
|
504 </p><a NAME="Refactoring.__performSOA" ID="Refactoring.__performSOA"></a> |
|
505 <h4>Refactoring.__performSOA</h4> |
|
506 <b>__performSOA</b>(<i></i>) |
|
507 <p> |
|
508 Private slot to perform SOA on all modules. |
|
509 </p><a NAME="Refactoring.__queryDefinition" ID="Refactoring.__queryDefinition"></a> |
|
510 <h4>Refactoring.__queryDefinition</h4> |
|
511 <b>__queryDefinition</b>(<i></i>) |
|
512 <p> |
|
513 Private slot to handle the Find Definition action |
|
514 </p><a NAME="Refactoring.__queryImplementations" ID="Refactoring.__queryImplementations"></a> |
|
515 <h4>Refactoring.__queryImplementations</h4> |
|
516 <b>__queryImplementations</b>(<i></i>) |
|
517 <p> |
|
518 Private slot to handle the Find Implementations action. |
|
519 </p><a NAME="Refactoring.__queryReferences" ID="Refactoring.__queryReferences"></a> |
|
520 <h4>Refactoring.__queryReferences</h4> |
|
521 <b>__queryReferences</b>(<i></i>) |
|
522 <p> |
|
523 Private slot to handle the Find References action. |
|
524 </p><a NAME="Refactoring.__redo" ID="Refactoring.__redo"></a> |
|
525 <h4>Refactoring.__redo</h4> |
|
526 <b>__redo</b>(<i></i>) |
|
527 <p> |
|
528 Private slot to redo the last refactoring. |
|
529 </p><a NAME="Refactoring.__rename" ID="Refactoring.__rename"></a> |
|
530 <h4>Refactoring.__rename</h4> |
|
531 <b>__rename</b>(<i></i>) |
|
532 <p> |
|
533 Private slot to handle the Rename action. |
|
534 </p><a NAME="Refactoring.__renameLocal" ID="Refactoring.__renameLocal"></a> |
|
535 <h4>Refactoring.__renameLocal</h4> |
|
536 <b>__renameLocal</b>(<i></i>) |
|
537 <p> |
|
538 Private slot to handle the Local Rename action. |
|
539 </p><a NAME="Refactoring.__renameModule" ID="Refactoring.__renameModule"></a> |
|
540 <h4>Refactoring.__renameModule</h4> |
|
541 <b>__renameModule</b>(<i></i>) |
|
542 <p> |
|
543 Private slot to handle the Rename Current Module action. |
|
544 </p><a NAME="Refactoring.__restructure" ID="Refactoring.__restructure"></a> |
|
545 <h4>Refactoring.__restructure</h4> |
|
546 <b>__restructure</b>(<i></i>) |
|
547 <p> |
|
548 Private slot to restructure code. |
|
549 </p><a NAME="Refactoring.__ropeConfigFile" ID="Refactoring.__ropeConfigFile"></a> |
|
550 <h4>Refactoring.__ropeConfigFile</h4> |
|
551 <b>__ropeConfigFile</b>(<i></i>) |
|
552 <p> |
|
553 Private method to get the name of the rope configuration file. |
|
554 </p><dl> |
|
555 <dt>Returns:</dt> |
|
556 <dd> |
|
557 name of the rope configuration file (string) |
|
558 </dd> |
|
559 </dl><a NAME="Refactoring.__ropeInfo" ID="Refactoring.__ropeInfo"></a> |
|
560 <h4>Refactoring.__ropeInfo</h4> |
|
561 <b>__ropeInfo</b>(<i></i>) |
|
562 <p> |
|
563 Private slot to show some info about rope. |
|
564 </p><a NAME="Refactoring.__showFileRedoHistory" ID="Refactoring.__showFileRedoHistory"></a> |
|
565 <h4>Refactoring.__showFileRedoHistory</h4> |
|
566 <b>__showFileRedoHistory</b>(<i></i>) |
|
567 <p> |
|
568 Private method to show list of changes related to the current file |
|
569 available for a redo operation. |
|
570 </p><a NAME="Refactoring.__showFileUndoHistory" ID="Refactoring.__showFileUndoHistory"></a> |
|
571 <h4>Refactoring.__showFileUndoHistory</h4> |
|
572 <b>__showFileUndoHistory</b>(<i></i>) |
|
573 <p> |
|
574 Private method to show list of changes related to the current file |
|
575 available for an undo operation. |
|
576 </p><a NAME="Refactoring.__showProjectRedoHistory" ID="Refactoring.__showProjectRedoHistory"></a> |
|
577 <h4>Refactoring.__showProjectRedoHistory</h4> |
|
578 <b>__showProjectRedoHistory</b>(<i></i>) |
|
579 <p> |
|
580 Private method to show list of changes available for a redo operation. |
|
581 </p><a NAME="Refactoring.__showProjectUndoHistory" ID="Refactoring.__showProjectUndoHistory"></a> |
|
582 <h4>Refactoring.__showProjectUndoHistory</h4> |
|
583 <b>__showProjectUndoHistory</b>(<i></i>) |
|
584 <p> |
|
585 Private method to show list of changes available for an undo operation. |
|
586 </p><a NAME="Refactoring.__showRefactoringHistoryMenu" ID="Refactoring.__showRefactoringHistoryMenu"></a> |
|
587 <h4>Refactoring.__showRefactoringHistoryMenu</h4> |
|
588 <b>__showRefactoringHistoryMenu</b>(<i></i>) |
|
589 <p> |
|
590 Private slot called before the refactoring history menu is shown. |
|
591 </p><a NAME="Refactoring.__showRefactoringMenu" ID="Refactoring.__showRefactoringMenu"></a> |
|
592 <h4>Refactoring.__showRefactoringMenu</h4> |
|
593 <b>__showRefactoringMenu</b>(<i></i>) |
|
594 <p> |
|
595 Private slot called before the refactoring menu is shown. |
|
596 </p><a NAME="Refactoring.__showRopeHelp" ID="Refactoring.__showRopeHelp"></a> |
|
597 <h4>Refactoring.__showRopeHelp</h4> |
|
598 <b>__showRopeHelp</b>(<i></i>) |
|
599 <p> |
|
600 Private slot to show help about the refactorings offered by Rope. |
|
601 </p><a NAME="Refactoring.__transformModuleToPackage" ID="Refactoring.__transformModuleToPackage"></a> |
|
602 <h4>Refactoring.__transformModuleToPackage</h4> |
|
603 <b>__transformModuleToPackage</b>(<i></i>) |
|
604 <p> |
|
605 Private slot to transform a module to a package. |
|
606 </p><a NAME="Refactoring.__undo" ID="Refactoring.__undo"></a> |
|
607 <h4>Refactoring.__undo</h4> |
|
608 <b>__undo</b>(<i></i>) |
|
609 <p> |
|
610 Private slot to undo the last refactoring. |
|
611 </p><a NAME="Refactoring.__updateConfig" ID="Refactoring.__updateConfig"></a> |
|
612 <h4>Refactoring.__updateConfig</h4> |
|
613 <b>__updateConfig</b>(<i></i>) |
|
614 <p> |
|
615 Private slot to update the configuration file. |
|
616 </p><a NAME="Refactoring.__useFunction" ID="Refactoring.__useFunction"></a> |
|
617 <h4>Refactoring.__useFunction</h4> |
|
618 <b>__useFunction</b>(<i></i>) |
|
619 <p> |
|
620 Private slot to use a function wherever possible. |
|
621 </p><a NAME="Refactoring.confirmAllBuffersSaved" ID="Refactoring.confirmAllBuffersSaved"></a> |
|
622 <h4>Refactoring.confirmAllBuffersSaved</h4> |
|
623 <b>confirmAllBuffersSaved</b>(<i></i>) |
|
624 <p> |
|
625 Private method to check, if any editor has unsaved changes. |
|
626 </p><dl> |
|
627 <dt>Returns:</dt> |
|
628 <dd> |
|
629 flag indicating, that no editor contains unsaved edits |
|
630 (boolean) |
|
631 </dd> |
|
632 </dl><a NAME="Refactoring.confirmBufferIsSaved" ID="Refactoring.confirmBufferIsSaved"></a> |
|
633 <h4>Refactoring.confirmBufferIsSaved</h4> |
|
634 <b>confirmBufferIsSaved</b>(<i>editor</i>) |
|
635 <p> |
|
636 Public method to check, if an editor has unsaved changes. |
|
637 </p><dl> |
|
638 <dt><i>editor</i></dt> |
|
639 <dd> |
|
640 reference to the editor to be checked |
|
641 </dd> |
|
642 </dl><dl> |
|
643 <dt>Returns:</dt> |
|
644 <dd> |
|
645 flag indicating, that the editor doesn't contain |
|
646 unsaved edits (boolean) |
|
647 </dd> |
|
648 </dl><a NAME="Refactoring.getActions" ID="Refactoring.getActions"></a> |
|
649 <h4>Refactoring.getActions</h4> |
|
650 <b>getActions</b>(<i></i>) |
|
651 <p> |
|
652 Public method to get a list of all actions. |
|
653 </p><dl> |
|
654 <dt>Returns:</dt> |
|
655 <dd> |
|
656 list of all actions (list of E5Action) |
|
657 </dd> |
|
658 </dl><a NAME="Refactoring.getProject" ID="Refactoring.getProject"></a> |
|
659 <h4>Refactoring.getProject</h4> |
|
660 <b>getProject</b>(<i></i>) |
|
661 <p> |
|
662 Public method to get a reference to the rope project object. |
|
663 </p><dl> |
|
664 <dt>Returns:</dt> |
|
665 <dd> |
|
666 reference to the rope project object (RopeProject) |
|
667 </dd> |
|
668 </dl><a NAME="Refactoring.handleRopeError" ID="Refactoring.handleRopeError"></a> |
|
669 <h4>Refactoring.handleRopeError</h4> |
|
670 <b>handleRopeError</b>(<i>err, title, handle=None</i>) |
|
671 <p> |
|
672 Public slot to handle a rope error. |
|
673 </p><dl> |
|
674 <dt><i>err</i></dt> |
|
675 <dd> |
|
676 rope exception object (Exception) |
|
677 </dd><dt><i>title</i></dt> |
|
678 <dd> |
|
679 title to be displayed (string) |
|
680 </dd><dt><i>handle</i></dt> |
|
681 <dd> |
|
682 reference to a taskhandle (ProgressHandle) |
|
683 </dd> |
|
684 </dl><a NAME="Refactoring.initActions" ID="Refactoring.initActions"></a> |
|
685 <h4>Refactoring.initActions</h4> |
|
686 <b>initActions</b>(<i></i>) |
|
687 <p> |
|
688 Public method to define the refactoring actions. |
|
689 </p><a NAME="Refactoring.initMenu" ID="Refactoring.initMenu"></a> |
|
690 <h4>Refactoring.initMenu</h4> |
|
691 <b>initMenu</b>(<i></i>) |
|
692 <p> |
|
693 Public slot to initialize the refactoring menu. |
|
694 </p><dl> |
|
695 <dt>Returns:</dt> |
|
696 <dd> |
|
697 the menu generated (QMenu) |
|
698 </dd> |
|
699 </dl><a NAME="Refactoring.projectClosed" ID="Refactoring.projectClosed"></a> |
|
700 <h4>Refactoring.projectClosed</h4> |
|
701 <b>projectClosed</b>(<i></i>) |
|
702 <p> |
|
703 Public slot to handle the projectClosed signal. |
|
704 </p><a NAME="Refactoring.projectOpened" ID="Refactoring.projectOpened"></a> |
|
705 <h4>Refactoring.projectOpened</h4> |
|
706 <b>projectOpened</b>(<i></i>) |
|
707 <p> |
|
708 Public slot to handle the projectOpened signal. |
|
709 </p><a NAME="Refactoring.refreshEditors" ID="Refactoring.refreshEditors"></a> |
|
710 <h4>Refactoring.refreshEditors</h4> |
|
711 <b>refreshEditors</b>(<i>changes</i>) |
|
712 <p> |
|
713 Public method to refresh modified editors. |
|
714 </p><dl> |
|
715 <dt><i>reference</i></dt> |
|
716 <dd> |
|
717 to the Changes object (rope.base.change.ChangeSet) |
|
718 </dd> |
|
719 </dl> |
|
720 <div align="right"><a href="#top">Up</a></div> |
|
721 <hr /> |
|
722 </body></html> |