RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.CodeAssistServer.html

branch
server_client_variant
changeset 214
ccc3918ac38c
parent 204
b4bf79b956bc
child 217
874115c79ca7
equal deleted inserted replaced
213:2547dd1627b3 214:ccc3918ac38c
58 <table> 58 <table>
59 <tr> 59 <tr>
60 <td><a href="#CodeAssistServer.__init__">CodeAssistServer</a></td> 60 <td><a href="#CodeAssistServer.__init__">CodeAssistServer</a></td>
61 <td>Constructor</td> 61 <td>Constructor</td>
62 </tr><tr> 62 </tr><tr>
63 <td><a href="#CodeAssistServer.__configChanged">__configChanged</a></td>
64 <td>Private slot called, when the rope config file has changed.</td>
65 </tr><tr>
66 <td><a href="#CodeAssistServer.__ensureActive">__ensureActive</a></td>
67 <td>Private method to ensure, that the requested client is active.</td>
68 </tr><tr>
69 <td><a href="#CodeAssistServer.__getConfigs">__getConfigs</a></td>
70 <td>Private method to get the configurations of all connected clients.</td>
71 </tr><tr>
63 <td><a href="#CodeAssistServer.__processCallTipsResult">__processCallTipsResult</a></td> 72 <td><a href="#CodeAssistServer.__processCallTipsResult">__processCallTipsResult</a></td>
64 <td>Private method to process the calltips sent by the client.</td> 73 <td>Private method to process the calltips sent by the client.</td>
65 </tr><tr> 74 </tr><tr>
75 <td><a href="#CodeAssistServer.__processClientException">__processClientException</a></td>
76 <td>Private method to handle exceptions of the refactoring client.</td>
77 </tr><tr>
66 <td><a href="#CodeAssistServer.__processCompletionsResult">__processCompletionsResult</a></td> 78 <td><a href="#CodeAssistServer.__processCompletionsResult">__processCompletionsResult</a></td>
67 <td>Private method to process the completions sent by the client.</td> 79 <td>Private method to process the completions sent by the client.</td>
68 </tr><tr> 80 </tr><tr>
81 <td><a href="#CodeAssistServer.__ropeConfigFile">__ropeConfigFile</a></td>
82 <td>Private method to get the name of the rope configuration file.</td>
83 </tr><tr>
84 <td><a href="#CodeAssistServer.__setAutoCompletionHook">__setAutoCompletionHook</a></td>
85 <td>Private method to set the auto-completion hook.</td>
86 </tr><tr>
87 <td><a href="#CodeAssistServer.__setCalltipsHook">__setCalltipsHook</a></td>
88 <td>Private method to set the calltip hook.</td>
89 </tr><tr>
90 <td><a href="#CodeAssistServer.__setConfig">__setConfig</a></td>
91 <td>Private method to set the rope client configuration data.</td>
92 </tr><tr>
69 <td><a href="#CodeAssistServer.__startCodeAssistClient">__startCodeAssistClient</a></td> 93 <td><a href="#CodeAssistServer.__startCodeAssistClient">__startCodeAssistClient</a></td>
70 <td>Private method to start the code assist client with the given interpreter.</td> 94 <td>Private method to start the code assist client with the given interpreter.</td>
71 </tr><tr> 95 </tr><tr>
96 <td><a href="#CodeAssistServer.__unsetAutoCompletionHook">__unsetAutoCompletionHook</a></td>
97 <td>Private method to unset the auto-completion hook.</td>
98 </tr><tr>
99 <td><a href="#CodeAssistServer.__unsetCalltipsHook">__unsetCalltipsHook</a></td>
100 <td>Private method to unset the calltip hook.</td>
101 </tr><tr>
72 <td><a href="#CodeAssistServer.__updateEditorLanguageMapping">__updateEditorLanguageMapping</a></td> 102 <td><a href="#CodeAssistServer.__updateEditorLanguageMapping">__updateEditorLanguageMapping</a></td>
73 <td>Private method to update the editor language to connection mapping.</td> 103 <td>Private method to update the editor language to connection mapping.</td>
74 </tr><tr> 104 </tr><tr>
75 <td><a href="#CodeAssistServer.activate">activate</a></td> 105 <td><a href="#CodeAssistServer.activate">activate</a></td>
76 <td>Public method to activate the code assist server.</td> 106 <td>Public method to activate the code assist server.</td>
77 </tr><tr> 107 </tr><tr>
108 <td><a href="#CodeAssistServer.connectEditor">connectEditor</a></td>
109 <td>Public method to connect an editor.</td>
110 </tr><tr>
78 <td><a href="#CodeAssistServer.deactivate">deactivate</a></td> 111 <td><a href="#CodeAssistServer.deactivate">deactivate</a></td>
79 <td>Public method to deactivate the code assist server.</td> 112 <td>Public method to deactivate the code assist server.</td>
80 </tr><tr> 113 </tr><tr>
114 <td><a href="#CodeAssistServer.disconnectEditor">disconnectEditor</a></td>
115 <td>Public method to disconnect an editor.</td>
116 </tr><tr>
117 <td><a href="#CodeAssistServer.editConfig">editConfig</a></td>
118 <td>Public slot to open the rope configuration file in an editor.</td>
119 </tr><tr>
81 <td><a href="#CodeAssistServer.getCallTips">getCallTips</a></td> 120 <td><a href="#CodeAssistServer.getCallTips">getCallTips</a></td>
82 <td>Public method to calculate calltips.</td> 121 <td>Public method to calculate calltips.</td>
83 </tr><tr> 122 </tr><tr>
84 <td><a href="#CodeAssistServer.getCompletions">getCompletions</a></td> 123 <td><a href="#CodeAssistServer.getCompletions">getCompletions</a></td>
85 <td>Public method to calculate the possible completions.</td> 124 <td>Public method to calculate the possible completions.</td>
93 <td><a href="#CodeAssistServer.isSupportedLanguage">isSupportedLanguage</a></td> 132 <td><a href="#CodeAssistServer.isSupportedLanguage">isSupportedLanguage</a></td>
94 <td>Public method to check, if the given language is supported.</td> 133 <td>Public method to check, if the given language is supported.</td>
95 </tr><tr> 134 </tr><tr>
96 <td><a href="#CodeAssistServer.reportChanged">reportChanged</a></td> 135 <td><a href="#CodeAssistServer.reportChanged">reportChanged</a></td>
97 <td>Public slot to report some changed sources.</td> 136 <td>Public slot to report some changed sources.</td>
137 </tr><tr>
138 <td><a href="#CodeAssistServer.requestCompletions">requestCompletions</a></td>
139 <td>Public method to request a list of possible completions.</td>
98 </tr> 140 </tr>
99 </table> 141 </table>
100 <h3>Static Methods</h3> 142 <h3>Static Methods</h3>
101 <table> 143 <table>
102 <tr><td>None</td></tr> 144 <tr><td>None</td></tr>
112 reference to the plugin object 154 reference to the plugin object
113 </dd><dt><i>parent</i> (QObject)</dt> 155 </dd><dt><i>parent</i> (QObject)</dt>
114 <dd> 156 <dd>
115 parent 157 parent
116 </dd> 158 </dd>
117 </dl><a NAME="CodeAssistServer.__processCallTipsResult" ID="CodeAssistServer.__processCallTipsResult"></a> 159 </dl><a NAME="CodeAssistServer.__configChanged" ID="CodeAssistServer.__configChanged"></a>
160 <h4>CodeAssistServer.__configChanged</h4>
161 <b>__configChanged</b>(<i>idString</i>)
162 <p>
163 Private slot called, when the rope config file has changed.
164 </p><dl>
165 <dt><i>idString</i> (str)</dt>
166 <dd>
167 id for which to get the configuration file
168 </dd>
169 </dl><a NAME="CodeAssistServer.__ensureActive" ID="CodeAssistServer.__ensureActive"></a>
170 <h4>CodeAssistServer.__ensureActive</h4>
171 <b>__ensureActive</b>(<i>idString</i>)
172 <p>
173 Private method to ensure, that the requested client is active.
174 </p><p>
175 A non-active client will be started.
176 </p><dl>
177 <dt>Returns:</dt>
178 <dd>
179 flag indicating an active client
180 </dd>
181 </dl><dl>
182 <dt>Return Type:</dt>
183 <dd>
184 bool
185 </dd>
186 </dl><a NAME="CodeAssistServer.__getConfigs" ID="CodeAssistServer.__getConfigs"></a>
187 <h4>CodeAssistServer.__getConfigs</h4>
188 <b>__getConfigs</b>(<i></i>)
189 <p>
190 Private method to get the configurations of all connected clients.
191 </p><a NAME="CodeAssistServer.__processCallTipsResult" ID="CodeAssistServer.__processCallTipsResult"></a>
118 <h4>CodeAssistServer.__processCallTipsResult</h4> 192 <h4>CodeAssistServer.__processCallTipsResult</h4>
119 <b>__processCallTipsResult</b>(<i>result</i>) 193 <b>__processCallTipsResult</b>(<i>result</i>)
120 <p> 194 <p>
121 Private method to process the calltips sent by the client. 195 Private method to process the calltips sent by the client.
122 </p><dl> 196 </p><dl>
123 <dt><i>result</i> (dict)</dt> 197 <dt><i>result</i> (dict)</dt>
124 <dd> 198 <dd>
125 dictionary containing the result sent by the client 199 dictionary containing the result sent by the client
200 </dd>
201 </dl><a NAME="CodeAssistServer.__processClientException" ID="CodeAssistServer.__processClientException"></a>
202 <h4>CodeAssistServer.__processClientException</h4>
203 <b>__processClientException</b>(<i>params</i>)
204 <p>
205 Private method to handle exceptions of the refactoring client.
206 </p><dl>
207 <dt><i>params</i> (dict)</dt>
208 <dd>
209 dictionary containing the exception data
126 </dd> 210 </dd>
127 </dl><a NAME="CodeAssistServer.__processCompletionsResult" ID="CodeAssistServer.__processCompletionsResult"></a> 211 </dl><a NAME="CodeAssistServer.__processCompletionsResult" ID="CodeAssistServer.__processCompletionsResult"></a>
128 <h4>CodeAssistServer.__processCompletionsResult</h4> 212 <h4>CodeAssistServer.__processCompletionsResult</h4>
129 <b>__processCompletionsResult</b>(<i>result</i>) 213 <b>__processCompletionsResult</b>(<i>result</i>)
130 <p> 214 <p>
132 </p><dl> 216 </p><dl>
133 <dt><i>result</i> (dict)</dt> 217 <dt><i>result</i> (dict)</dt>
134 <dd> 218 <dd>
135 dictionary containing the result sent by the client 219 dictionary containing the result sent by the client
136 </dd> 220 </dd>
221 </dl><a NAME="CodeAssistServer.__ropeConfigFile" ID="CodeAssistServer.__ropeConfigFile"></a>
222 <h4>CodeAssistServer.__ropeConfigFile</h4>
223 <b>__ropeConfigFile</b>(<i>idString</i>)
224 <p>
225 Private method to get the name of the rope configuration file.
226 </p><dl>
227 <dt><i>idString</i> (str)</dt>
228 <dd>
229 id for which to get the configuration file
230 </dd>
231 </dl><dl>
232 <dt>Returns:</dt>
233 <dd>
234 name of the rope configuration file
235 </dd>
236 </dl><dl>
237 <dt>Return Type:</dt>
238 <dd>
239 str
240 </dd>
241 </dl><a NAME="CodeAssistServer.__setAutoCompletionHook" ID="CodeAssistServer.__setAutoCompletionHook"></a>
242 <h4>CodeAssistServer.__setAutoCompletionHook</h4>
243 <b>__setAutoCompletionHook</b>(<i>editor</i>)
244 <p>
245 Private method to set the auto-completion hook.
246 </p><dl>
247 <dt><i>editor</i> (QScintilla.Editor)</dt>
248 <dd>
249 reference to the editor
250 </dd>
251 </dl><a NAME="CodeAssistServer.__setCalltipsHook" ID="CodeAssistServer.__setCalltipsHook"></a>
252 <h4>CodeAssistServer.__setCalltipsHook</h4>
253 <b>__setCalltipsHook</b>(<i>editor</i>)
254 <p>
255 Private method to set the calltip hook.
256 </p><dl>
257 <dt><i>editor</i> (QScintilla.Editor)</dt>
258 <dd>
259 reference to the editor
260 </dd>
261 </dl><a NAME="CodeAssistServer.__setConfig" ID="CodeAssistServer.__setConfig"></a>
262 <h4>CodeAssistServer.__setConfig</h4>
263 <b>__setConfig</b>(<i>params</i>)
264 <p>
265 Private method to set the rope client configuration data.
266 </p><dl>
267 <dt><i>params</i> (dict)</dt>
268 <dd>
269 dictionary containing the configuration data
270 </dd>
137 </dl><a NAME="CodeAssistServer.__startCodeAssistClient" ID="CodeAssistServer.__startCodeAssistClient"></a> 271 </dl><a NAME="CodeAssistServer.__startCodeAssistClient" ID="CodeAssistServer.__startCodeAssistClient"></a>
138 <h4>CodeAssistServer.__startCodeAssistClient</h4> 272 <h4>CodeAssistServer.__startCodeAssistClient</h4>
139 <b>__startCodeAssistClient</b>(<i>interpreter, idString</i>) 273 <b>__startCodeAssistClient</b>(<i>interpreter, idString</i>)
140 <p> 274 <p>
141 Private method to start the code assist client with the given 275 Private method to start the code assist client with the given
145 <dd> 279 <dd>
146 interpreter to be used for the code assist client 280 interpreter to be used for the code assist client
147 </dd><dt><i>idString</i> (str)</dt> 281 </dd><dt><i>idString</i> (str)</dt>
148 <dd> 282 <dd>
149 id of the client to be started 283 id of the client to be started
284 </dd>
285 </dl><dl>
286 <dt>Returns:</dt>
287 <dd>
288 flag indicating a successful start of the client
289 </dd>
290 </dl><dl>
291 <dt>Return Type:</dt>
292 <dd>
293 bool
294 </dd>
295 </dl><a NAME="CodeAssistServer.__unsetAutoCompletionHook" ID="CodeAssistServer.__unsetAutoCompletionHook"></a>
296 <h4>CodeAssistServer.__unsetAutoCompletionHook</h4>
297 <b>__unsetAutoCompletionHook</b>(<i>editor</i>)
298 <p>
299 Private method to unset the auto-completion hook.
300 </p><dl>
301 <dt><i>editor</i> (QScintilla.Editor)</dt>
302 <dd>
303 reference to the editor
304 </dd>
305 </dl><a NAME="CodeAssistServer.__unsetCalltipsHook" ID="CodeAssistServer.__unsetCalltipsHook"></a>
306 <h4>CodeAssistServer.__unsetCalltipsHook</h4>
307 <b>__unsetCalltipsHook</b>(<i>editor</i>)
308 <p>
309 Private method to unset the calltip hook.
310 </p><dl>
311 <dt><i>editor</i> (QScintilla.Editor)</dt>
312 <dd>
313 reference to the editor
150 </dd> 314 </dd>
151 </dl><a NAME="CodeAssistServer.__updateEditorLanguageMapping" ID="CodeAssistServer.__updateEditorLanguageMapping"></a> 315 </dl><a NAME="CodeAssistServer.__updateEditorLanguageMapping" ID="CodeAssistServer.__updateEditorLanguageMapping"></a>
152 <h4>CodeAssistServer.__updateEditorLanguageMapping</h4> 316 <h4>CodeAssistServer.__updateEditorLanguageMapping</h4>
153 <b>__updateEditorLanguageMapping</b>(<i></i>) 317 <b>__updateEditorLanguageMapping</b>(<i></i>)
154 <p> 318 <p>
159 <p> 323 <p>
160 Public method to activate the code assist server. 324 Public method to activate the code assist server.
161 </p><p> 325 </p><p>
162 Note: This method provides for some growth potential. 326 Note: This method provides for some growth potential.
163 Currently it is empty. 327 Currently it is empty.
164 </p><a NAME="CodeAssistServer.deactivate" ID="CodeAssistServer.deactivate"></a> 328 </p><a NAME="CodeAssistServer.connectEditor" ID="CodeAssistServer.connectEditor"></a>
329 <h4>CodeAssistServer.connectEditor</h4>
330 <b>connectEditor</b>(<i>editor</i>)
331 <p>
332 Public method to connect an editor.
333 </p><dl>
334 <dt><i>editor</i> (QScintilla.Editor)</dt>
335 <dd>
336 reference to the editor
337 </dd>
338 </dl><a NAME="CodeAssistServer.deactivate" ID="CodeAssistServer.deactivate"></a>
165 <h4>CodeAssistServer.deactivate</h4> 339 <h4>CodeAssistServer.deactivate</h4>
166 <b>deactivate</b>(<i></i>) 340 <b>deactivate</b>(<i></i>)
167 <p> 341 <p>
168 Public method to deactivate the code assist server. 342 Public method to deactivate the code assist server.
169 </p><a NAME="CodeAssistServer.getCallTips" ID="CodeAssistServer.getCallTips"></a> 343 </p><a NAME="CodeAssistServer.disconnectEditor" ID="CodeAssistServer.disconnectEditor"></a>
344 <h4>CodeAssistServer.disconnectEditor</h4>
345 <b>disconnectEditor</b>(<i>editor</i>)
346 <p>
347 Public method to disconnect an editor.
348 </p><dl>
349 <dt><i>editor</i> (QScintilla.Editor)</dt>
350 <dd>
351 reference to the editor
352 </dd>
353 </dl><a NAME="CodeAssistServer.editConfig" ID="CodeAssistServer.editConfig"></a>
354 <h4>CodeAssistServer.editConfig</h4>
355 <b>editConfig</b>(<i>idString</i>)
356 <p>
357 Public slot to open the rope configuration file in an editor.
358 </p><dl>
359 <dt><i>idString</i> (str)</dt>
360 <dd>
361 id for which to get the configuration file
362 </dd>
363 </dl><a NAME="CodeAssistServer.getCallTips" ID="CodeAssistServer.getCallTips"></a>
170 <h4>CodeAssistServer.getCallTips</h4> 364 <h4>CodeAssistServer.getCallTips</h4>
171 <b>getCallTips</b>(<i>pos, editor</i>) 365 <b>getCallTips</b>(<i>editor, pos, commas</i>)
172 <p> 366 <p>
173 Public method to calculate calltips. 367 Public method to calculate calltips.
174 </p><dl> 368 </p><dl>
175 <dt><i>pos</i> (int)</dt> 369 <dt><i>editor</i> (QScintilla.Editor)</dt>
370 <dd>
371 reference to the editor object, that called this method
372 </dd><dt><i>pos</i> (int)</dt>
176 <dd> 373 <dd>
177 position in the text for the calltip 374 position in the text for the calltip
178 </dd><dt><i>editor</i> (QScintilla.Editor)</dt> 375 </dd><dt><i>commas</i> (int)</dt>
179 <dd> 376 <dd>
180 reference to the editor object, that called this method 377 minimum number of commas contained in the calltip
181 </dd> 378 </dd>
182 </dl><dl> 379 </dl><dl>
183 <dt>Returns:</dt> 380 <dt>Returns:</dt>
184 <dd> 381 <dd>
185 list of possible calltips 382 list of possible calltips
189 <dd> 386 <dd>
190 list of str 387 list of str
191 </dd> 388 </dd>
192 </dl><a NAME="CodeAssistServer.getCompletions" ID="CodeAssistServer.getCompletions"></a> 389 </dl><a NAME="CodeAssistServer.getCompletions" ID="CodeAssistServer.getCompletions"></a>
193 <h4>CodeAssistServer.getCompletions</h4> 390 <h4>CodeAssistServer.getCompletions</h4>
194 <b>getCompletions</b>(<i>editor</i>) 391 <b>getCompletions</b>(<i>editor, context</i>)
195 <p> 392 <p>
196 Public method to calculate the possible completions. 393 Public method to calculate the possible completions.
394 </p><p>
395 Note: This is the synchronous variant for eric6 before 17.11.
197 </p><dl> 396 </p><dl>
198 <dt><i>editor</i> (QScintilla.Editor)</dt> 397 <dt><i>editor</i> (QScintilla.Editor)</dt>
199 <dd> 398 <dd>
200 reference to the editor object, that called this method 399 reference to the editor object, that called this method
201 </dd> 400 </dd><dt><i>context</i> (bool)</dt>
202 </dl><dl> 401 <dd>
203 <dt>Returns:</dt> 402 flag indicating to autocomplete a context
204 <dd> 403 </dd>
205 list of proposals 404 </dl><dl>
405 <dt>Returns:</dt>
406 <dd>
407 list of possible completions
206 </dd> 408 </dd>
207 </dl><dl> 409 </dl><dl>
208 <dt>Return Type:</dt> 410 <dt>Return Type:</dt>
209 <dd> 411 <dd>
210 list of str 412 list of str
258 file name of the changed source 460 file name of the changed source
259 </dd><dt><i>oldSource</i> (str)</dt> 461 </dd><dt><i>oldSource</i> (str)</dt>
260 <dd> 462 <dd>
261 source code before the change 463 source code before the change
262 </dd> 464 </dd>
465 </dl><a NAME="CodeAssistServer.requestCompletions" ID="CodeAssistServer.requestCompletions"></a>
466 <h4>CodeAssistServer.requestCompletions</h4>
467 <b>requestCompletions</b>(<i>editor, context, acText</i>)
468 <p>
469 Public method to request a list of possible completions.
470 </p><p>
471 Note: This is part of the asynchronous variant for eric6 17.11 and
472 later.
473 </p><dl>
474 <dt><i>editor</i> (QScintilla.Editor)</dt>
475 <dd>
476 reference to the editor object, that called this method
477 </dd><dt><i>context</i> (bool)</dt>
478 <dd>
479 flag indicating to autocomplete a context
480 </dd><dt><i>acText</i> (str)</dt>
481 <dd>
482 text to be completed
483 </dd>
263 </dl> 484 </dl>
264 <div align="right"><a href="#top">Up</a></div> 485 <div align="right"><a href="#top">Up</a></div>
265 <hr /> 486 <hr />
266 </body></html> 487 </body></html>

eric ide

mercurial