RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.CodeAssistClient.html

changeset 321
d51e810107ec
parent 295
8318a6881e63
child 347
b5048b5ff454
equal deleted inserted replaced
320:91b171fdd85f 321:d51e810107ec
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>Plugin_Refactoring_Rope.RefactoringRope.CodeAssistClient</h1> 23 <h1>Plugin_Refactoring_Rope.RefactoringRope.CodeAssistClient</h1>
24
23 <p> 25 <p>
24 Module implementing the code assist client interface to rope. 26 Module implementing the code assist client interface to rope.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#CodeAssistClient">CodeAssistClient</a></td> 38 <td><a href="#CodeAssistClient">CodeAssistClient</a></td>
34 <td>Class implementing the code assist client interface to rope.</td> 39 <td>Class implementing the code assist client interface to rope.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
43
38 <table> 44 <table>
39 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
40 </table> 46 </table>
41 <hr /><hr /> 47 <hr />
48 <hr />
42 <a NAME="CodeAssistClient" ID="CodeAssistClient"></a> 49 <a NAME="CodeAssistClient" ID="CodeAssistClient"></a>
43 <h2>CodeAssistClient</h2> 50 <h2>CodeAssistClient</h2>
51
44 <p> 52 <p>
45 Class implementing the code assist client interface to rope. 53 Class implementing the code assist client interface to rope.
46 </p> 54 </p>
47 <h3>Derived from</h3> 55 <h3>Derived from</h3>
48 JsonClient 56 JsonClient
49 <h3>Class Attributes</h3> 57 <h3>Class Attributes</h3>
58
50 <table> 59 <table>
51 <tr><td>IdProject</td></tr> 60 <tr><td>IdProject</td></tr>
52 </table> 61 </table>
53 <h3>Class Methods</h3> 62 <h3>Class Methods</h3>
63
54 <table> 64 <table>
55 <tr><td>None</td></tr> 65 <tr><td>None</td></tr>
56 </table> 66 </table>
57 <h3>Methods</h3> 67 <h3>Methods</h3>
58 <table> 68
69 <table>
70
59 <tr> 71 <tr>
60 <td><a href="#CodeAssistClient.__init__">CodeAssistClient</a></td> 72 <td><a href="#CodeAssistClient.__init__">CodeAssistClient</a></td>
61 <td>Constructor</td> 73 <td>Constructor</td>
62 </tr><tr> 74 </tr>
75 <tr>
63 <td><a href="#CodeAssistClient.__closeProject">__closeProject</a></td> 76 <td><a href="#CodeAssistClient.__closeProject">__closeProject</a></td>
64 <td>Private slot to validate the project.</td> 77 <td>Private slot to validate the project.</td>
65 </tr><tr> 78 </tr>
79 <tr>
66 <td><a href="#CodeAssistClient.__configChanged">__configChanged</a></td> 80 <td><a href="#CodeAssistClient.__configChanged">__configChanged</a></td>
67 <td>Private method to handle a change of the configuration file.</td> 81 <td>Private method to handle a change of the configuration file.</td>
68 </tr><tr> 82 </tr>
83 <tr>
69 <td><a href="#CodeAssistClient.__getCallTips">__getCallTips</a></td> 84 <td><a href="#CodeAssistClient.__getCallTips">__getCallTips</a></td>
70 <td>Private method to calculate possible calltips.</td> 85 <td>Private method to calculate possible calltips.</td>
71 </tr><tr> 86 </tr>
87 <tr>
72 <td><a href="#CodeAssistClient.__getCompletions">__getCompletions</a></td> 88 <td><a href="#CodeAssistClient.__getCompletions">__getCompletions</a></td>
73 <td>Private method to calculate possible completions.</td> 89 <td>Private method to calculate possible completions.</td>
74 </tr><tr> 90 </tr>
91 <tr>
75 <td><a href="#CodeAssistClient.__getConfig">__getConfig</a></td> 92 <td><a href="#CodeAssistClient.__getConfig">__getConfig</a></td>
76 <td>Private method to send some configuration data to the server.</td> 93 <td>Private method to send some configuration data to the server.</td>
77 </tr><tr> 94 </tr>
95 <tr>
78 <td><a href="#CodeAssistClient.__getDocumentation">__getDocumentation</a></td> 96 <td><a href="#CodeAssistClient.__getDocumentation">__getDocumentation</a></td>
79 <td>Private method to get some source code documentation.</td> 97 <td>Private method to get some source code documentation.</td>
80 </tr><tr> 98 </tr>
99 <tr>
81 <td><a href="#CodeAssistClient.__getObjectTypeAndName">__getObjectTypeAndName</a></td> 100 <td><a href="#CodeAssistClient.__getObjectTypeAndName">__getObjectTypeAndName</a></td>
82 <td>Private method to determine an object type and name for the given location.</td> 101 <td>Private method to determine an object type and name for the given location.</td>
83 </tr><tr> 102 </tr>
103 <tr>
84 <td><a href="#CodeAssistClient.__gotoDefinition">__gotoDefinition</a></td> 104 <td><a href="#CodeAssistClient.__gotoDefinition">__gotoDefinition</a></td>
85 <td>Private method to handle the Goto Definition action.</td> 105 <td>Private method to handle the Goto Definition action.</td>
86 </tr><tr> 106 </tr>
107 <tr>
87 <td><a href="#CodeAssistClient.__handleRopeError">__handleRopeError</a></td> 108 <td><a href="#CodeAssistClient.__handleRopeError">__handleRopeError</a></td>
88 <td>Private method to process a rope error.</td> 109 <td>Private method to process a rope error.</td>
89 </tr><tr> 110 </tr>
111 <tr>
90 <td><a href="#CodeAssistClient.__processDocumentation">__processDocumentation</a></td> 112 <td><a href="#CodeAssistClient.__processDocumentation">__processDocumentation</a></td>
91 <td>Private method to process the call-tips and documentation.</td> 113 <td>Private method to process the call-tips and documentation.</td>
92 </tr><tr> 114 </tr>
115 <tr>
93 <td><a href="#CodeAssistClient.__reportChanged">__reportChanged</a></td> 116 <td><a href="#CodeAssistClient.__reportChanged">__reportChanged</a></td>
94 <td>Private method to register some changed sources.</td> 117 <td>Private method to register some changed sources.</td>
95 </tr><tr> 118 </tr>
119 <tr>
96 <td><a href="#CodeAssistClient.handleCall">handleCall</a></td> 120 <td><a href="#CodeAssistClient.handleCall">handleCall</a></td>
97 <td>Public method to handle a method call from the server.</td> 121 <td>Public method to handle a method call from the server.</td>
98 </tr> 122 </tr>
99 </table> 123 </table>
100 <h3>Static Methods</h3> 124 <h3>Static Methods</h3>
125
101 <table> 126 <table>
102 <tr><td>None</td></tr> 127 <tr><td>None</td></tr>
103 </table> 128 </table>
129
104 <a NAME="CodeAssistClient.__init__" ID="CodeAssistClient.__init__"></a> 130 <a NAME="CodeAssistClient.__init__" ID="CodeAssistClient.__init__"></a>
105 <h4>CodeAssistClient (Constructor)</h4> 131 <h4>CodeAssistClient (Constructor)</h4>
106 <b>CodeAssistClient</b>(<i>host, port, idString, projectPath</i>) 132 <b>CodeAssistClient</b>(<i>host, port, idString, projectPath</i>)
133
107 <p> 134 <p>
108 Constructor 135 Constructor
109 </p><dl> 136 </p>
137 <dl>
138
110 <dt><i>host</i> (str)</dt> 139 <dt><i>host</i> (str)</dt>
111 <dd> 140 <dd>
112 ip address the background service is listening 141 ip address the background service is listening
113 </dd><dt><i>port</i> (int)</dt> 142 </dd>
143 <dt><i>port</i> (int)</dt>
114 <dd> 144 <dd>
115 port of the background service 145 port of the background service
116 </dd><dt><i>idString</i> (str)</dt> 146 </dd>
147 <dt><i>idString</i> (str)</dt>
117 <dd> 148 <dd>
118 assigned client id to be sent back to the server in 149 assigned client id to be sent back to the server in
119 order to identify the connection 150 order to identify the connection
120 </dd><dt><i>projectPath</i> (str)</dt> 151 </dd>
152 <dt><i>projectPath</i> (str)</dt>
121 <dd> 153 <dd>
122 path to the project 154 path to the project
123 </dd> 155 </dd>
124 </dl><a NAME="CodeAssistClient.__closeProject" ID="CodeAssistClient.__closeProject"></a> 156 </dl>
157 <a NAME="CodeAssistClient.__closeProject" ID="CodeAssistClient.__closeProject"></a>
125 <h4>CodeAssistClient.__closeProject</h4> 158 <h4>CodeAssistClient.__closeProject</h4>
126 <b>__closeProject</b>(<i>params</i>) 159 <b>__closeProject</b>(<i>params</i>)
160
127 <p> 161 <p>
128 Private slot to validate the project. 162 Private slot to validate the project.
129 </p><dl> 163 </p>
130 <dt><i>params</i> (dict)</dt> 164 <dl>
131 <dd> 165
132 dictionary containing the method parameters sent by 166 <dt><i>params</i> (dict)</dt>
133 the server 167 <dd>
134 </dd> 168 dictionary containing the method parameters sent by
135 </dl><a NAME="CodeAssistClient.__configChanged" ID="CodeAssistClient.__configChanged"></a> 169 the server
170 </dd>
171 </dl>
172 <a NAME="CodeAssistClient.__configChanged" ID="CodeAssistClient.__configChanged"></a>
136 <h4>CodeAssistClient.__configChanged</h4> 173 <h4>CodeAssistClient.__configChanged</h4>
137 <b>__configChanged</b>(<i>params</i>) 174 <b>__configChanged</b>(<i>params</i>)
175
138 <p> 176 <p>
139 Private method to handle a change of the configuration file. 177 Private method to handle a change of the configuration file.
140 </p><dl> 178 </p>
141 <dt><i>params</i> (dict)</dt> 179 <dl>
142 <dd> 180
143 dictionary containing the method parameters sent by 181 <dt><i>params</i> (dict)</dt>
144 the server 182 <dd>
145 </dd> 183 dictionary containing the method parameters sent by
146 </dl><a NAME="CodeAssistClient.__getCallTips" ID="CodeAssistClient.__getCallTips"></a> 184 the server
185 </dd>
186 </dl>
187 <a NAME="CodeAssistClient.__getCallTips" ID="CodeAssistClient.__getCallTips"></a>
147 <h4>CodeAssistClient.__getCallTips</h4> 188 <h4>CodeAssistClient.__getCallTips</h4>
148 <b>__getCallTips</b>(<i>params</i>) 189 <b>__getCallTips</b>(<i>params</i>)
190
149 <p> 191 <p>
150 Private method to calculate possible calltips. 192 Private method to calculate possible calltips.
151 </p><dl> 193 </p>
194 <dl>
195
152 <dt><i>params</i> (dict)</dt> 196 <dt><i>params</i> (dict)</dt>
153 <dd> 197 <dd>
154 dictionary containing the method parameters 198 dictionary containing the method parameters
155 </dd> 199 </dd>
156 </dl><a NAME="CodeAssistClient.__getCompletions" ID="CodeAssistClient.__getCompletions"></a> 200 </dl>
201 <a NAME="CodeAssistClient.__getCompletions" ID="CodeAssistClient.__getCompletions"></a>
157 <h4>CodeAssistClient.__getCompletions</h4> 202 <h4>CodeAssistClient.__getCompletions</h4>
158 <b>__getCompletions</b>(<i>params</i>) 203 <b>__getCompletions</b>(<i>params</i>)
204
159 <p> 205 <p>
160 Private method to calculate possible completions. 206 Private method to calculate possible completions.
161 </p><dl> 207 </p>
208 <dl>
209
162 <dt><i>params</i> (dict)</dt> 210 <dt><i>params</i> (dict)</dt>
163 <dd> 211 <dd>
164 dictionary containing the method parameters 212 dictionary containing the method parameters
165 </dd> 213 </dd>
166 </dl><a NAME="CodeAssistClient.__getConfig" ID="CodeAssistClient.__getConfig"></a> 214 </dl>
215 <a NAME="CodeAssistClient.__getConfig" ID="CodeAssistClient.__getConfig"></a>
167 <h4>CodeAssistClient.__getConfig</h4> 216 <h4>CodeAssistClient.__getConfig</h4>
168 <b>__getConfig</b>(<i>params</i>) 217 <b>__getConfig</b>(<i>params</i>)
218
169 <p> 219 <p>
170 Private method to send some configuration data to the server. 220 Private method to send some configuration data to the server.
171 </p><dl> 221 </p>
172 <dt><i>params</i> (dict)</dt> 222 <dl>
173 <dd> 223
174 dictionary containing the method parameters sent by 224 <dt><i>params</i> (dict)</dt>
175 the server 225 <dd>
176 </dd> 226 dictionary containing the method parameters sent by
177 </dl><a NAME="CodeAssistClient.__getDocumentation" ID="CodeAssistClient.__getDocumentation"></a> 227 the server
228 </dd>
229 </dl>
230 <a NAME="CodeAssistClient.__getDocumentation" ID="CodeAssistClient.__getDocumentation"></a>
178 <h4>CodeAssistClient.__getDocumentation</h4> 231 <h4>CodeAssistClient.__getDocumentation</h4>
179 <b>__getDocumentation</b>(<i>params</i>) 232 <b>__getDocumentation</b>(<i>params</i>)
233
180 <p> 234 <p>
181 Private method to get some source code documentation. 235 Private method to get some source code documentation.
182 </p><dl> 236 </p>
237 <dl>
238
183 <dt><i>params</i> (dict)</dt> 239 <dt><i>params</i> (dict)</dt>
184 <dd> 240 <dd>
185 dictionary containing the method parameters 241 dictionary containing the method parameters
186 </dd> 242 </dd>
187 </dl><a NAME="CodeAssistClient.__getObjectTypeAndName" ID="CodeAssistClient.__getObjectTypeAndName"></a> 243 </dl>
244 <a NAME="CodeAssistClient.__getObjectTypeAndName" ID="CodeAssistClient.__getObjectTypeAndName"></a>
188 <h4>CodeAssistClient.__getObjectTypeAndName</h4> 245 <h4>CodeAssistClient.__getObjectTypeAndName</h4>
189 <b>__getObjectTypeAndName</b>(<i>project, sourceCode, offset, resource=None, maxfixes=1</i>) 246 <b>__getObjectTypeAndName</b>(<i>project, sourceCode, offset, resource=None, maxfixes=1</i>)
247
190 <p> 248 <p>
191 Private method to determine an object type and name for the given 249 Private method to determine an object type and name for the given
192 location. 250 location.
193 </p><dl> 251 </p>
252 <dl>
253
194 <dt><i>project</i> (rope.base.project.Project)</dt> 254 <dt><i>project</i> (rope.base.project.Project)</dt>
195 <dd> 255 <dd>
196 reference to the rope project object 256 reference to the rope project object
197 </dd><dt><i>sourceCode</i> (str)</dt> 257 </dd>
258 <dt><i>sourceCode</i> (str)</dt>
198 <dd> 259 <dd>
199 source code 260 source code
200 </dd><dt><i>offset</i> (int)</dt> 261 </dd>
262 <dt><i>offset</i> (int)</dt>
201 <dd> 263 <dd>
202 offset to base the calculation on 264 offset to base the calculation on
203 </dd><dt><i>resource</i> (rope.base.resources.Resource)</dt> 265 </dd>
266 <dt><i>resource</i> (rope.base.resources.Resource)</dt>
204 <dd> 267 <dd>
205 reference to the rope resource object 268 reference to the rope resource object
206 </dd><dt><i>maxfixes</i> (int)</dt> 269 </dd>
270 <dt><i>maxfixes</i> (int)</dt>
207 <dd> 271 <dd>
208 number of fixes to be done 272 number of fixes to be done
209 </dd> 273 </dd>
210 </dl><dl> 274 </dl>
275 <dl>
211 <dt>Returns:</dt> 276 <dt>Returns:</dt>
212 <dd> 277 <dd>
213 tuple containing the object type and name 278 tuple containing the object type and name
214 </dd> 279 </dd>
215 </dl><dl> 280 </dl>
281 <dl>
216 <dt>Return Type:</dt> 282 <dt>Return Type:</dt>
217 <dd> 283 <dd>
218 tuple of (str, str) 284 tuple of (str, str)
219 </dd> 285 </dd>
220 </dl><a NAME="CodeAssistClient.__gotoDefinition" ID="CodeAssistClient.__gotoDefinition"></a> 286 </dl>
287 <a NAME="CodeAssistClient.__gotoDefinition" ID="CodeAssistClient.__gotoDefinition"></a>
221 <h4>CodeAssistClient.__gotoDefinition</h4> 288 <h4>CodeAssistClient.__gotoDefinition</h4>
222 <b>__gotoDefinition</b>(<i>params</i>) 289 <b>__gotoDefinition</b>(<i>params</i>)
290
223 <p> 291 <p>
224 Private method to handle the Goto Definition action. 292 Private method to handle the Goto Definition action.
225 </p><dl> 293 </p>
226 <dt><i>params</i> (dict)</dt> 294 <dl>
227 <dd> 295
228 dictionary containing the method parameters sent by 296 <dt><i>params</i> (dict)</dt>
229 the server 297 <dd>
230 </dd> 298 dictionary containing the method parameters sent by
231 </dl><a NAME="CodeAssistClient.__handleRopeError" ID="CodeAssistClient.__handleRopeError"></a> 299 the server
300 </dd>
301 </dl>
302 <a NAME="CodeAssistClient.__handleRopeError" ID="CodeAssistClient.__handleRopeError"></a>
232 <h4>CodeAssistClient.__handleRopeError</h4> 303 <h4>CodeAssistClient.__handleRopeError</h4>
233 <b>__handleRopeError</b>(<i>err</i>) 304 <b>__handleRopeError</b>(<i>err</i>)
305
234 <p> 306 <p>
235 Private method to process a rope error. 307 Private method to process a rope error.
236 </p><dl> 308 </p>
309 <dl>
310
237 <dt><i>err</i> (Exception)</dt> 311 <dt><i>err</i> (Exception)</dt>
238 <dd> 312 <dd>
239 rope exception object 313 rope exception object
240 </dd> 314 </dd>
241 </dl><dl> 315 </dl>
316 <dl>
242 <dt>Returns:</dt> 317 <dt>Returns:</dt>
243 <dd> 318 <dd>
244 dictionary containing the error information 319 dictionary containing the error information
245 </dd> 320 </dd>
246 </dl><dl> 321 </dl>
322 <dl>
247 <dt>Return Type:</dt> 323 <dt>Return Type:</dt>
248 <dd> 324 <dd>
249 dict 325 dict
250 </dd> 326 </dd>
251 </dl><a NAME="CodeAssistClient.__processDocumentation" ID="CodeAssistClient.__processDocumentation"></a> 327 </dl>
328 <a NAME="CodeAssistClient.__processDocumentation" ID="CodeAssistClient.__processDocumentation"></a>
252 <h4>CodeAssistClient.__processDocumentation</h4> 329 <h4>CodeAssistClient.__processDocumentation</h4>
253 <b>__processDocumentation</b>(<i>cts, documentation, typeName</i>) 330 <b>__processDocumentation</b>(<i>cts, documentation, typeName</i>)
331
254 <p> 332 <p>
255 Private method to process the call-tips and documentation. 333 Private method to process the call-tips and documentation.
256 </p><dl> 334 </p>
335 <dl>
336
257 <dt><i>cts</i> (str)</dt> 337 <dt><i>cts</i> (str)</dt>
258 <dd> 338 <dd>
259 call-tips 339 call-tips
260 </dd><dt><i>documentation</i> (str)</dt> 340 </dd>
341 <dt><i>documentation</i> (str)</dt>
261 <dd> 342 <dd>
262 extracted source code documentation 343 extracted source code documentation
263 </dd><dt><i>typeName</i> (tuple of (str, str))</dt> 344 </dd>
345 <dt><i>typeName</i> (tuple of (str, str))</dt>
264 <dd> 346 <dd>
265 type and name of the object 347 type and name of the object
266 </dd> 348 </dd>
267 </dl><dl> 349 </dl>
350 <dl>
268 <dt>Returns:</dt> 351 <dt>Returns:</dt>
269 <dd> 352 <dd>
270 dictionary containing document information 353 dictionary containing document information
271 </dd> 354 </dd>
272 </dl><dl> 355 </dl>
356 <dl>
273 <dt>Return Type:</dt> 357 <dt>Return Type:</dt>
274 <dd> 358 <dd>
275 dictionary with keys "name", "argspec", "module" and 359 dictionary with keys "name", "argspec", "module" and
276 "docstring" 360 "docstring"
277 </dd> 361 </dd>
278 </dl><a NAME="CodeAssistClient.__reportChanged" ID="CodeAssistClient.__reportChanged"></a> 362 </dl>
363 <a NAME="CodeAssistClient.__reportChanged" ID="CodeAssistClient.__reportChanged"></a>
279 <h4>CodeAssistClient.__reportChanged</h4> 364 <h4>CodeAssistClient.__reportChanged</h4>
280 <b>__reportChanged</b>(<i>params</i>) 365 <b>__reportChanged</b>(<i>params</i>)
366
281 <p> 367 <p>
282 Private method to register some changed sources. 368 Private method to register some changed sources.
283 </p><dl> 369 </p>
284 <dt><i>params</i> (dict)</dt> 370 <dl>
285 <dd> 371
286 dictionary containing the method parameters sent by 372 <dt><i>params</i> (dict)</dt>
287 the server 373 <dd>
288 </dd> 374 dictionary containing the method parameters sent by
289 </dl><a NAME="CodeAssistClient.handleCall" ID="CodeAssistClient.handleCall"></a> 375 the server
376 </dd>
377 </dl>
378 <a NAME="CodeAssistClient.handleCall" ID="CodeAssistClient.handleCall"></a>
290 <h4>CodeAssistClient.handleCall</h4> 379 <h4>CodeAssistClient.handleCall</h4>
291 <b>handleCall</b>(<i>method, params</i>) 380 <b>handleCall</b>(<i>method, params</i>)
381
292 <p> 382 <p>
293 Public method to handle a method call from the server. 383 Public method to handle a method call from the server.
294 </p><dl> 384 </p>
385 <dl>
386
295 <dt><i>method</i> (str)</dt> 387 <dt><i>method</i> (str)</dt>
296 <dd> 388 <dd>
297 requested method name 389 requested method name
298 </dd><dt><i>params</i> (dict)</dt> 390 </dd>
391 <dt><i>params</i> (dict)</dt>
299 <dd> 392 <dd>
300 dictionary with method specific parameters 393 dictionary with method specific parameters
301 </dd> 394 </dd>
302 </dl> 395 </dl>
303 <div align="right"><a href="#top">Up</a></div> 396 <div align="right"><a href="#top">Up</a></div>

eric ide

mercurial