|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.JediInterface.JediClient</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.JediInterface.JediClient</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing the Jedi client of eric7. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>SuppressedException</td></tr><tr><td>modulePath</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#JediClient">JediClient</a></td> |
|
25 <td>Class implementing the Jedi client of eric7.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="JediClient" ID="JediClient"></a> |
|
36 <h2>JediClient</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing the Jedi client of eric7. |
|
40 </p> |
|
41 <h3>Derived from</h3> |
|
42 EricJsonClient |
|
43 <h3>Class Attributes</h3> |
|
44 |
|
45 <table> |
|
46 <tr><td>None</td></tr> |
|
47 </table> |
|
48 <h3>Class Methods</h3> |
|
49 |
|
50 <table> |
|
51 <tr><td>None</td></tr> |
|
52 </table> |
|
53 <h3>Methods</h3> |
|
54 |
|
55 <table> |
|
56 |
|
57 <tr> |
|
58 <td><a href="#JediClient.__init__">JediClient</a></td> |
|
59 <td>Constructor</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#JediClient.__applyRefactoring">__applyRefactoring</a></td> |
|
63 <td>Private method to apply a refactoring.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#JediClient.__cancelRefactoring">__cancelRefactoring</a></td> |
|
67 <td>Private method to cancel a refactoring.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#JediClient.__closeProject">__closeProject</a></td> |
|
71 <td>Private method to save a jedi project's data.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#JediClient.__completionFullName">__completionFullName</a></td> |
|
75 <td>Private method to extract the full completion name.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#JediClient.__completionType">__completionType</a></td> |
|
79 <td>Private method to assemble the completion type depending on the visibility indicated by the completion name.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#JediClient.__extractFunction">__extractFunction</a></td> |
|
83 <td>Private method to extract an expression to a new function.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#JediClient.__extractParameters">__extractParameters</a></td> |
|
87 <td>Private method to extract the call parameter descriptions.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#JediClient.__extractVariable">__extractVariable</a></td> |
|
91 <td>Private method to extract a statement to a new variable.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#JediClient.__getAssignment">__getAssignment</a></td> |
|
95 <td>Private method to get the place a parameter is defined.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#JediClient.__getCallTips">__getCallTips</a></td> |
|
99 <td>Private method to calculate possible calltips.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#JediClient.__getCompletions">__getCompletions</a></td> |
|
103 <td>Private method to calculate possible completions.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#JediClient.__getDocumentation">__getDocumentation</a></td> |
|
107 <td>Private method to get some source code documentation.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#JediClient.__getHoverHelp">__getHoverHelp</a></td> |
|
111 <td>Private method to get some source code documentation.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#JediClient.__getReferences">__getReferences</a></td> |
|
115 <td>Private method to get the places a parameter is referenced.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#JediClient.__handleError">__handleError</a></td> |
|
119 <td>Private method to process an error.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#JediClient.__inlineVariable">__inlineVariable</a></td> |
|
123 <td>Private method to inline a variable statement.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#JediClient.__openProject">__openProject</a></td> |
|
127 <td>Private method to create a jedi project and load its saved data.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#JediClient.__renameVariable">__renameVariable</a></td> |
|
131 <td>Private method to rename the variable under the cursor.</td> |
|
132 </tr> |
|
133 <tr> |
|
134 <td><a href="#JediClient.handleCall">handleCall</a></td> |
|
135 <td>Public method to handle a method call from the server.</td> |
|
136 </tr> |
|
137 </table> |
|
138 <h3>Static Methods</h3> |
|
139 |
|
140 <table> |
|
141 <tr><td>None</td></tr> |
|
142 </table> |
|
143 |
|
144 <a NAME="JediClient.__init__" ID="JediClient.__init__"></a> |
|
145 <h4>JediClient (Constructor)</h4> |
|
146 <b>JediClient</b>(<i>host, port, idString</i>) |
|
147 |
|
148 <p> |
|
149 Constructor |
|
150 </p> |
|
151 <dl> |
|
152 |
|
153 <dt><i>host</i> (str)</dt> |
|
154 <dd> |
|
155 ip address the background service is listening |
|
156 </dd> |
|
157 <dt><i>port</i> (int)</dt> |
|
158 <dd> |
|
159 port of the background service |
|
160 </dd> |
|
161 <dt><i>idString</i> (str)</dt> |
|
162 <dd> |
|
163 assigned client id to be sent back to the server in |
|
164 order to identify the connection |
|
165 </dd> |
|
166 </dl> |
|
167 <a NAME="JediClient.__applyRefactoring" ID="JediClient.__applyRefactoring"></a> |
|
168 <h4>JediClient.__applyRefactoring</h4> |
|
169 <b>__applyRefactoring</b>(<i>params</i>) |
|
170 |
|
171 <p> |
|
172 Private method to apply a refactoring. |
|
173 </p> |
|
174 <dl> |
|
175 |
|
176 <dt><i>params</i> (dict)</dt> |
|
177 <dd> |
|
178 dictionary containing the method parameters |
|
179 </dd> |
|
180 </dl> |
|
181 <a NAME="JediClient.__cancelRefactoring" ID="JediClient.__cancelRefactoring"></a> |
|
182 <h4>JediClient.__cancelRefactoring</h4> |
|
183 <b>__cancelRefactoring</b>(<i>params</i>) |
|
184 |
|
185 <p> |
|
186 Private method to cancel a refactoring. |
|
187 </p> |
|
188 <dl> |
|
189 |
|
190 <dt><i>params</i> (dict)</dt> |
|
191 <dd> |
|
192 dictionary containing the method parameters |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="JediClient.__closeProject" ID="JediClient.__closeProject"></a> |
|
196 <h4>JediClient.__closeProject</h4> |
|
197 <b>__closeProject</b>(<i>params</i>) |
|
198 |
|
199 <p> |
|
200 Private method to save a jedi project's data. |
|
201 </p> |
|
202 <dl> |
|
203 |
|
204 <dt><i>params</i> (dict)</dt> |
|
205 <dd> |
|
206 dictionary containing the method parameters |
|
207 </dd> |
|
208 </dl> |
|
209 <a NAME="JediClient.__completionFullName" ID="JediClient.__completionFullName"></a> |
|
210 <h4>JediClient.__completionFullName</h4> |
|
211 <b>__completionFullName</b>(<i>completion</i>) |
|
212 |
|
213 <p> |
|
214 Private method to extract the full completion name. |
|
215 </p> |
|
216 <dl> |
|
217 |
|
218 <dt><i>completion</i> (jedi.api.classes.Completion)</dt> |
|
219 <dd> |
|
220 reference to the completion object |
|
221 </dd> |
|
222 </dl> |
|
223 <dl> |
|
224 <dt>Return:</dt> |
|
225 <dd> |
|
226 full completion name |
|
227 </dd> |
|
228 </dl> |
|
229 <dl> |
|
230 <dt>Return Type:</dt> |
|
231 <dd> |
|
232 str |
|
233 </dd> |
|
234 </dl> |
|
235 <a NAME="JediClient.__completionType" ID="JediClient.__completionType"></a> |
|
236 <h4>JediClient.__completionType</h4> |
|
237 <b>__completionType</b>(<i>completion</i>) |
|
238 |
|
239 <p> |
|
240 Private method to assemble the completion type depending on the |
|
241 visibility indicated by the completion name. |
|
242 </p> |
|
243 <dl> |
|
244 |
|
245 <dt><i>completion</i> (jedi.api.classes.Completion)</dt> |
|
246 <dd> |
|
247 reference to the completion object |
|
248 </dd> |
|
249 </dl> |
|
250 <dl> |
|
251 <dt>Return:</dt> |
|
252 <dd> |
|
253 modified completion type |
|
254 </dd> |
|
255 </dl> |
|
256 <dl> |
|
257 <dt>Return Type:</dt> |
|
258 <dd> |
|
259 str |
|
260 </dd> |
|
261 </dl> |
|
262 <a NAME="JediClient.__extractFunction" ID="JediClient.__extractFunction"></a> |
|
263 <h4>JediClient.__extractFunction</h4> |
|
264 <b>__extractFunction</b>(<i>params</i>) |
|
265 |
|
266 <p> |
|
267 Private method to extract an expression to a new function. |
|
268 </p> |
|
269 <dl> |
|
270 |
|
271 <dt><i>params</i> (dict)</dt> |
|
272 <dd> |
|
273 dictionary containing the method parameters |
|
274 </dd> |
|
275 </dl> |
|
276 <a NAME="JediClient.__extractParameters" ID="JediClient.__extractParameters"></a> |
|
277 <h4>JediClient.__extractParameters</h4> |
|
278 <b>__extractParameters</b>(<i>signature</i>) |
|
279 |
|
280 <p> |
|
281 Private method to extract the call parameter descriptions. |
|
282 </p> |
|
283 <dl> |
|
284 |
|
285 <dt><i>signature</i> (object)</dt> |
|
286 <dd> |
|
287 a jedi signature object |
|
288 </dd> |
|
289 </dl> |
|
290 <dl> |
|
291 <dt>Return:</dt> |
|
292 <dd> |
|
293 a string with comma seperated parameter names and default |
|
294 values |
|
295 </dd> |
|
296 </dl> |
|
297 <dl> |
|
298 <dt>Return Type:</dt> |
|
299 <dd> |
|
300 str |
|
301 </dd> |
|
302 </dl> |
|
303 <a NAME="JediClient.__extractVariable" ID="JediClient.__extractVariable"></a> |
|
304 <h4>JediClient.__extractVariable</h4> |
|
305 <b>__extractVariable</b>(<i>params</i>) |
|
306 |
|
307 <p> |
|
308 Private method to extract a statement to a new variable. |
|
309 </p> |
|
310 <dl> |
|
311 |
|
312 <dt><i>params</i> (dict)</dt> |
|
313 <dd> |
|
314 dictionary containing the method parameters |
|
315 </dd> |
|
316 </dl> |
|
317 <a NAME="JediClient.__getAssignment" ID="JediClient.__getAssignment"></a> |
|
318 <h4>JediClient.__getAssignment</h4> |
|
319 <b>__getAssignment</b>(<i>params</i>) |
|
320 |
|
321 <p> |
|
322 Private method to get the place a parameter is defined. |
|
323 </p> |
|
324 <dl> |
|
325 |
|
326 <dt><i>params</i> (dict)</dt> |
|
327 <dd> |
|
328 dictionary containing the method parameters |
|
329 </dd> |
|
330 </dl> |
|
331 <a NAME="JediClient.__getCallTips" ID="JediClient.__getCallTips"></a> |
|
332 <h4>JediClient.__getCallTips</h4> |
|
333 <b>__getCallTips</b>(<i>params</i>) |
|
334 |
|
335 <p> |
|
336 Private method to calculate possible calltips. |
|
337 </p> |
|
338 <dl> |
|
339 |
|
340 <dt><i>params</i> (dict)</dt> |
|
341 <dd> |
|
342 dictionary containing the method parameters |
|
343 </dd> |
|
344 </dl> |
|
345 <a NAME="JediClient.__getCompletions" ID="JediClient.__getCompletions"></a> |
|
346 <h4>JediClient.__getCompletions</h4> |
|
347 <b>__getCompletions</b>(<i>params</i>) |
|
348 |
|
349 <p> |
|
350 Private method to calculate possible completions. |
|
351 </p> |
|
352 <dl> |
|
353 |
|
354 <dt><i>params</i> (dict)</dt> |
|
355 <dd> |
|
356 dictionary containing the method parameters |
|
357 </dd> |
|
358 </dl> |
|
359 <a NAME="JediClient.__getDocumentation" ID="JediClient.__getDocumentation"></a> |
|
360 <h4>JediClient.__getDocumentation</h4> |
|
361 <b>__getDocumentation</b>(<i>params</i>) |
|
362 |
|
363 <p> |
|
364 Private method to get some source code documentation. |
|
365 </p> |
|
366 <dl> |
|
367 |
|
368 <dt><i>params</i> (dict)</dt> |
|
369 <dd> |
|
370 dictionary containing the method parameters |
|
371 </dd> |
|
372 </dl> |
|
373 <a NAME="JediClient.__getHoverHelp" ID="JediClient.__getHoverHelp"></a> |
|
374 <h4>JediClient.__getHoverHelp</h4> |
|
375 <b>__getHoverHelp</b>(<i>params</i>) |
|
376 |
|
377 <p> |
|
378 Private method to get some source code documentation. |
|
379 </p> |
|
380 <dl> |
|
381 |
|
382 <dt><i>params</i> (dict)</dt> |
|
383 <dd> |
|
384 dictionary containing the method parameters |
|
385 </dd> |
|
386 </dl> |
|
387 <a NAME="JediClient.__getReferences" ID="JediClient.__getReferences"></a> |
|
388 <h4>JediClient.__getReferences</h4> |
|
389 <b>__getReferences</b>(<i>params</i>) |
|
390 |
|
391 <p> |
|
392 Private method to get the places a parameter is referenced. |
|
393 </p> |
|
394 <dl> |
|
395 |
|
396 <dt><i>params</i> (dict)</dt> |
|
397 <dd> |
|
398 dictionary containing the method parameters |
|
399 </dd> |
|
400 </dl> |
|
401 <a NAME="JediClient.__handleError" ID="JediClient.__handleError"></a> |
|
402 <h4>JediClient.__handleError</h4> |
|
403 <b>__handleError</b>(<i>err</i>) |
|
404 |
|
405 <p> |
|
406 Private method to process an error. |
|
407 </p> |
|
408 <dl> |
|
409 |
|
410 <dt><i>err</i> (Exception or Warning)</dt> |
|
411 <dd> |
|
412 exception object |
|
413 </dd> |
|
414 </dl> |
|
415 <dl> |
|
416 <dt>Return:</dt> |
|
417 <dd> |
|
418 dictionary containing the error information |
|
419 </dd> |
|
420 </dl> |
|
421 <dl> |
|
422 <dt>Return Type:</dt> |
|
423 <dd> |
|
424 dict |
|
425 </dd> |
|
426 </dl> |
|
427 <a NAME="JediClient.__inlineVariable" ID="JediClient.__inlineVariable"></a> |
|
428 <h4>JediClient.__inlineVariable</h4> |
|
429 <b>__inlineVariable</b>(<i>params</i>) |
|
430 |
|
431 <p> |
|
432 Private method to inline a variable statement. |
|
433 </p> |
|
434 <dl> |
|
435 |
|
436 <dt><i>params</i> (dict)</dt> |
|
437 <dd> |
|
438 dictionary containing the method parameters |
|
439 </dd> |
|
440 </dl> |
|
441 <a NAME="JediClient.__openProject" ID="JediClient.__openProject"></a> |
|
442 <h4>JediClient.__openProject</h4> |
|
443 <b>__openProject</b>(<i>params</i>) |
|
444 |
|
445 <p> |
|
446 Private method to create a jedi project and load its saved data. |
|
447 </p> |
|
448 <dl> |
|
449 |
|
450 <dt><i>params</i> (dict)</dt> |
|
451 <dd> |
|
452 dictionary containing the method parameters |
|
453 </dd> |
|
454 </dl> |
|
455 <a NAME="JediClient.__renameVariable" ID="JediClient.__renameVariable"></a> |
|
456 <h4>JediClient.__renameVariable</h4> |
|
457 <b>__renameVariable</b>(<i>params</i>) |
|
458 |
|
459 <p> |
|
460 Private method to rename the variable under the cursor. |
|
461 </p> |
|
462 <dl> |
|
463 |
|
464 <dt><i>params</i> (dict)</dt> |
|
465 <dd> |
|
466 dictionary containing the method parameters |
|
467 </dd> |
|
468 </dl> |
|
469 <a NAME="JediClient.handleCall" ID="JediClient.handleCall"></a> |
|
470 <h4>JediClient.handleCall</h4> |
|
471 <b>handleCall</b>(<i>method, params</i>) |
|
472 |
|
473 <p> |
|
474 Public method to handle a method call from the server. |
|
475 </p> |
|
476 <dl> |
|
477 |
|
478 <dt><i>method</i> (str)</dt> |
|
479 <dd> |
|
480 requested method name |
|
481 </dd> |
|
482 <dt><i>params</i> (dict)</dt> |
|
483 <dd> |
|
484 dictionary with method specific parameters |
|
485 </dd> |
|
486 </dl> |
|
487 <div align="right"><a href="#top">Up</a></div> |
|
488 <hr /> |
|
489 </body></html> |