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

branch
server_client_variant
changeset 204
b4bf79b956bc
child 214
ccc3918ac38c
equal deleted inserted replaced
203:c38750e1bafd 204:b4bf79b956bc
1 <!DOCTYPE html>
2 <html><head>
3 <title>Plugin_Refactoring_Rope.RefactoringRope.CodeAssistServer</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>Plugin_Refactoring_Rope.RefactoringRope.CodeAssistServer</h1>
23 <p>
24 Module implementing the autocompletion interface to rope.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#CodeAssistServer">CodeAssistServer</a></td>
34 <td>Class implementing the autocompletion interface to rope.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="CodeAssistServer" ID="CodeAssistServer"></a>
43 <h2>CodeAssistServer</h2>
44 <p>
45 Class implementing the autocompletion interface to rope.
46 </p>
47 <h3>Derived from</h3>
48 JsonServer
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#CodeAssistServer.__init__">CodeAssistServer</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#CodeAssistServer.__processCallTipsResult">__processCallTipsResult</a></td>
64 <td>Private method to process the calltips sent by the client.</td>
65 </tr><tr>
66 <td><a href="#CodeAssistServer.__processCompletionsResult">__processCompletionsResult</a></td>
67 <td>Private method to process the completions sent by the client.</td>
68 </tr><tr>
69 <td><a href="#CodeAssistServer.__startCodeAssistClient">__startCodeAssistClient</a></td>
70 <td>Private method to start the code assist client with the given interpreter.</td>
71 </tr><tr>
72 <td><a href="#CodeAssistServer.__updateEditorLanguageMapping">__updateEditorLanguageMapping</a></td>
73 <td>Private method to update the editor language to connection mapping.</td>
74 </tr><tr>
75 <td><a href="#CodeAssistServer.activate">activate</a></td>
76 <td>Public method to activate the code assist server.</td>
77 </tr><tr>
78 <td><a href="#CodeAssistServer.deactivate">deactivate</a></td>
79 <td>Public method to deactivate the code assist server.</td>
80 </tr><tr>
81 <td><a href="#CodeAssistServer.getCallTips">getCallTips</a></td>
82 <td>Public method to calculate calltips.</td>
83 </tr><tr>
84 <td><a href="#CodeAssistServer.getCompletions">getCompletions</a></td>
85 <td>Public method to calculate the possible completions.</td>
86 </tr><tr>
87 <td><a href="#CodeAssistServer.handleCall">handleCall</a></td>
88 <td>Public method to handle a method call from the client.</td>
89 </tr><tr>
90 <td><a href="#CodeAssistServer.handleNewConnection">handleNewConnection</a></td>
91 <td>Public slot for new incoming connections from a client.</td>
92 </tr><tr>
93 <td><a href="#CodeAssistServer.isSupportedLanguage">isSupportedLanguage</a></td>
94 <td>Public method to check, if the given language is supported.</td>
95 </tr><tr>
96 <td><a href="#CodeAssistServer.reportChanged">reportChanged</a></td>
97 <td>Public slot to report some changed sources.</td>
98 </tr>
99 </table>
100 <h3>Static Methods</h3>
101 <table>
102 <tr><td>None</td></tr>
103 </table>
104 <a NAME="CodeAssistServer.__init__" ID="CodeAssistServer.__init__"></a>
105 <h4>CodeAssistServer (Constructor)</h4>
106 <b>CodeAssistServer</b>(<i>plugin, parent=None</i>)
107 <p>
108 Constructor
109 </p><dl>
110 <dt><i>plugin</i> (RefactoringRopePlugin)</dt>
111 <dd>
112 reference to the plugin object
113 </dd><dt><i>parent</i> (QObject)</dt>
114 <dd>
115 parent
116 </dd>
117 </dl><a NAME="CodeAssistServer.__processCallTipsResult" ID="CodeAssistServer.__processCallTipsResult"></a>
118 <h4>CodeAssistServer.__processCallTipsResult</h4>
119 <b>__processCallTipsResult</b>(<i>result</i>)
120 <p>
121 Private method to process the calltips sent by the client.
122 </p><dl>
123 <dt><i>result</i> (dict)</dt>
124 <dd>
125 dictionary containing the result sent by the client
126 </dd>
127 </dl><a NAME="CodeAssistServer.__processCompletionsResult" ID="CodeAssistServer.__processCompletionsResult"></a>
128 <h4>CodeAssistServer.__processCompletionsResult</h4>
129 <b>__processCompletionsResult</b>(<i>result</i>)
130 <p>
131 Private method to process the completions sent by the client.
132 </p><dl>
133 <dt><i>result</i> (dict)</dt>
134 <dd>
135 dictionary containing the result sent by the client
136 </dd>
137 </dl><a NAME="CodeAssistServer.__startCodeAssistClient" ID="CodeAssistServer.__startCodeAssistClient"></a>
138 <h4>CodeAssistServer.__startCodeAssistClient</h4>
139 <b>__startCodeAssistClient</b>(<i>interpreter, idString</i>)
140 <p>
141 Private method to start the code assist client with the given
142 interpreter.
143 </p><dl>
144 <dt><i>interpreter</i> (str)</dt>
145 <dd>
146 interpreter to be used for the code assist client
147 </dd><dt><i>idString</i> (str)</dt>
148 <dd>
149 id of the client to be started
150 </dd>
151 </dl><a NAME="CodeAssistServer.__updateEditorLanguageMapping" ID="CodeAssistServer.__updateEditorLanguageMapping"></a>
152 <h4>CodeAssistServer.__updateEditorLanguageMapping</h4>
153 <b>__updateEditorLanguageMapping</b>(<i></i>)
154 <p>
155 Private method to update the editor language to connection mapping.
156 </p><a NAME="CodeAssistServer.activate" ID="CodeAssistServer.activate"></a>
157 <h4>CodeAssistServer.activate</h4>
158 <b>activate</b>(<i></i>)
159 <p>
160 Public method to activate the code assist server.
161 </p><p>
162 Note: This method provides for some growth potential.
163 Currently it is empty.
164 </p><a NAME="CodeAssistServer.deactivate" ID="CodeAssistServer.deactivate"></a>
165 <h4>CodeAssistServer.deactivate</h4>
166 <b>deactivate</b>(<i></i>)
167 <p>
168 Public method to deactivate the code assist server.
169 </p><a NAME="CodeAssistServer.getCallTips" ID="CodeAssistServer.getCallTips"></a>
170 <h4>CodeAssistServer.getCallTips</h4>
171 <b>getCallTips</b>(<i>pos, editor</i>)
172 <p>
173 Public method to calculate calltips.
174 </p><dl>
175 <dt><i>pos</i> (int)</dt>
176 <dd>
177 position in the text for the calltip
178 </dd><dt><i>editor</i> (QScintilla.Editor)</dt>
179 <dd>
180 reference to the editor object, that called this method
181 </dd>
182 </dl><dl>
183 <dt>Returns:</dt>
184 <dd>
185 list of possible calltips
186 </dd>
187 </dl><dl>
188 <dt>Return Type:</dt>
189 <dd>
190 list of str
191 </dd>
192 </dl><a NAME="CodeAssistServer.getCompletions" ID="CodeAssistServer.getCompletions"></a>
193 <h4>CodeAssistServer.getCompletions</h4>
194 <b>getCompletions</b>(<i>editor</i>)
195 <p>
196 Public method to calculate the possible completions.
197 </p><dl>
198 <dt><i>editor</i> (QScintilla.Editor)</dt>
199 <dd>
200 reference to the editor object, that called this method
201 </dd>
202 </dl><dl>
203 <dt>Returns:</dt>
204 <dd>
205 list of proposals
206 </dd>
207 </dl><dl>
208 <dt>Return Type:</dt>
209 <dd>
210 list of str
211 </dd>
212 </dl><a NAME="CodeAssistServer.handleCall" ID="CodeAssistServer.handleCall"></a>
213 <h4>CodeAssistServer.handleCall</h4>
214 <b>handleCall</b>(<i>method, params</i>)
215 <p>
216 Public method to handle a method call from the client.
217 </p><dl>
218 <dt><i>method</i> (str)</dt>
219 <dd>
220 requested method name
221 </dd><dt><i>params</i> (dict)</dt>
222 <dd>
223 dictionary with method specific parameters
224 </dd>
225 </dl><a NAME="CodeAssistServer.handleNewConnection" ID="CodeAssistServer.handleNewConnection"></a>
226 <h4>CodeAssistServer.handleNewConnection</h4>
227 <b>handleNewConnection</b>(<i></i>)
228 <p>
229 Public slot for new incoming connections from a client.
230 </p><a NAME="CodeAssistServer.isSupportedLanguage" ID="CodeAssistServer.isSupportedLanguage"></a>
231 <h4>CodeAssistServer.isSupportedLanguage</h4>
232 <b>isSupportedLanguage</b>(<i>language</i>)
233 <p>
234 Public method to check, if the given language is supported.
235 </p><dl>
236 <dt><i>language</i> (str)</dt>
237 <dd>
238 editor programming language to check
239 </dd>
240 </dl><dl>
241 <dt>Returns:</dt>
242 <dd>
243 flag indicating the support status
244 </dd>
245 </dl><dl>
246 <dt>Return Type:</dt>
247 <dd>
248 bool
249 </dd>
250 </dl><a NAME="CodeAssistServer.reportChanged" ID="CodeAssistServer.reportChanged"></a>
251 <h4>CodeAssistServer.reportChanged</h4>
252 <b>reportChanged</b>(<i>filename, oldSource</i>)
253 <p>
254 Public slot to report some changed sources.
255 </p><dl>
256 <dt><i>filename</i> (str)</dt>
257 <dd>
258 file name of the changed source
259 </dd><dt><i>oldSource</i> (str)</dt>
260 <dd>
261 source code before the change
262 </dd>
263 </dl>
264 <div align="right"><a href="#top">Up</a></div>
265 <hr />
266 </body></html>

eric ide

mercurial