AssistantEric/Documentation/source/Plugin_Assistant_Eric.AssistantEric.Assistant.html

changeset 2
89cbc07f4bf0
child 19
7eb775bb326b
equal deleted inserted replaced
1:3a4123edc944 2:89cbc07f4bf0
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_Assistant_Eric.AssistantEric.Assistant</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>Plugin_Assistant_Eric.AssistantEric.Assistant</h1>
24 <p>
25 Module implementing the eric assistant, an alternative autocompletion and
26 calltips system.
27 </p>
28 <h3>Global Attributes</h3>
29 <table>
30 <tr><td>AcsAPIs</td></tr><tr><td>AcsDocument</td></tr><tr><td>AcsOther</td></tr><tr><td>AcsProject</td></tr>
31 </table>
32 <h3>Classes</h3>
33 <table>
34 <tr>
35 <td><a href="#Assistant">Assistant</a></td>
36 <td>Class implementing the autocompletion and calltips system.</td>
37 </tr>
38 </table>
39 <h3>Functions</h3>
40 <table>
41 <tr><td>None</td></tr>
42 </table>
43 <hr /><hr />
44 <a NAME="Assistant" ID="Assistant"></a>
45 <h2>Assistant</h2>
46 <p>
47 Class implementing the autocompletion and calltips system.
48 </p>
49 <h3>Derived from</h3>
50 QObject
51 <h3>Class Attributes</h3>
52 <table>
53 <tr><td>None</td></tr>
54 </table>
55 <h3>Methods</h3>
56 <table>
57 <tr>
58 <td><a href="#Assistant.__init__">Assistant</a></td>
59 <td>Constructor</td>
60 </tr><tr>
61 <td><a href="#Assistant.__completionListSelected">__completionListSelected</a></td>
62 <td>Private slot to handle the selection from the completion list.</td>
63 </tr><tr>
64 <td><a href="#Assistant.__editorClosed">__editorClosed</a></td>
65 <td>Private slot called, when an editor was closed.</td>
66 </tr><tr>
67 <td><a href="#Assistant.__editorOpened">__editorOpened</a></td>
68 <td>Private slot called, when a new editor was opened.</td>
69 </tr><tr>
70 <td><a href="#Assistant.__getApiCompletions">__getApiCompletions</a></td>
71 <td>Private method to determine a list of completions from an API object.</td>
72 </tr><tr>
73 <td><a href="#Assistant.__getCharacter">__getCharacter</a></td>
74 <td>Private method to get the character to the left of the current position in the current line.</td>
75 </tr><tr>
76 <td><a href="#Assistant.__preferencesChanged">__preferencesChanged</a></td>
77 <td>Private method to handle a change of the global configuration.</td>
78 </tr><tr>
79 <td><a href="#Assistant.__setAutoCompletionHook">__setAutoCompletionHook</a></td>
80 <td>Private method to set the autocompletion hook.</td>
81 </tr><tr>
82 <td><a href="#Assistant.__setCalltipsHook">__setCalltipsHook</a></td>
83 <td>Private method to set the calltip hook.</td>
84 </tr><tr>
85 <td><a href="#Assistant.__shutdown">__shutdown</a></td>
86 <td>Private slot to handle the shutdown signal.</td>
87 </tr><tr>
88 <td><a href="#Assistant.__unsetAutoCompletionHook">__unsetAutoCompletionHook</a></td>
89 <td>Private method to unset the autocompletion hook.</td>
90 </tr><tr>
91 <td><a href="#Assistant.__unsetCalltipsHook">__unsetCalltipsHook</a></td>
92 <td>Private method to unset the calltip hook.</td>
93 </tr><tr>
94 <td><a href="#Assistant.activate">activate</a></td>
95 <td>Public method to perform actions upon activation.</td>
96 </tr><tr>
97 <td><a href="#Assistant.autocomplete">autocomplete</a></td>
98 <td>Public method to determine the autocompletion proposals.</td>
99 </tr><tr>
100 <td><a href="#Assistant.calltips">calltips</a></td>
101 <td>Public method to return a list of calltips.</td>
102 </tr><tr>
103 <td><a href="#Assistant.deactivate">deactivate</a></td>
104 <td>Public method to perform actions upon deactivation.</td>
105 </tr><tr>
106 <td><a href="#Assistant.getCompletionsFromDocument">getCompletionsFromDocument</a></td>
107 <td>Public method to determine autocompletion proposals from the document.</td>
108 </tr><tr>
109 <td><a href="#Assistant.setEnabled">setEnabled</a></td>
110 <td>Public method to enable or disable a feature.</td>
111 </tr>
112 </table>
113 <a NAME="Assistant.__init__" ID="Assistant.__init__"></a>
114 <h4>Assistant (Constructor)</h4>
115 <b>Assistant</b>(<i>plugin, parent = None</i>)
116 <p>
117 Constructor
118 </p><dl>
119 <dt><i>plugin</i></dt>
120 <dd>
121 reference to the plugin object
122 </dd><dt><i>parent</i></dt>
123 <dd>
124 parent (QObject)
125 </dd>
126 </dl><a NAME="Assistant.__completionListSelected" ID="Assistant.__completionListSelected"></a>
127 <h4>Assistant.__completionListSelected</h4>
128 <b>__completionListSelected</b>(<i>id, txt</i>)
129 <p>
130 Private slot to handle the selection from the completion list.
131 </p><dl>
132 <dt><i>id</i></dt>
133 <dd>
134 the ID of the user list (should be 1) (integer)
135 </dd><dt><i>txt</i></dt>
136 <dd>
137 the selected text (string)
138 </dd>
139 </dl><a NAME="Assistant.__editorClosed" ID="Assistant.__editorClosed"></a>
140 <h4>Assistant.__editorClosed</h4>
141 <b>__editorClosed</b>(<i>editor</i>)
142 <p>
143 Private slot called, when an editor was closed.
144 </p><dl>
145 <dt><i>editor</i></dt>
146 <dd>
147 reference to the editor (QScintilla.Editor)
148 </dd>
149 </dl><a NAME="Assistant.__editorOpened" ID="Assistant.__editorOpened"></a>
150 <h4>Assistant.__editorOpened</h4>
151 <b>__editorOpened</b>(<i>editor</i>)
152 <p>
153 Private slot called, when a new editor was opened.
154 </p><dl>
155 <dt><i>editor</i></dt>
156 <dd>
157 reference to the new editor (QScintilla.Editor)
158 </dd>
159 </dl><a NAME="Assistant.__getApiCompletions" ID="Assistant.__getApiCompletions"></a>
160 <h4>Assistant.__getApiCompletions</h4>
161 <b>__getApiCompletions</b>(<i>api, word, context</i>)
162 <p>
163 Private method to determine a list of completions from an API object.
164 </p><dl>
165 <dt><i>api</i></dt>
166 <dd>
167 reference to the API object to be used (APIsManager.DbAPIs)
168 </dd><dt><i>word</i></dt>
169 <dd>
170 word (or wordpart) to complete (string)
171 </dd><dt><i>context</i></dt>
172 <dd>
173 flag indicating to autocomplete a context (boolean)
174 </dd>
175 </dl><dl>
176 <dt>Returns:</dt>
177 <dd>
178 list of possible completions (list of strings)
179 </dd>
180 </dl><a NAME="Assistant.__getCharacter" ID="Assistant.__getCharacter"></a>
181 <h4>Assistant.__getCharacter</h4>
182 <b>__getCharacter</b>(<i>pos, editor</i>)
183 <p>
184 Private method to get the character to the left of the current position
185 in the current line.
186 </p><dl>
187 <dt><i>pos</i></dt>
188 <dd>
189 position to get character at (integer)
190 </dd><dt><i>editor</i></dt>
191 <dd>
192 reference to the editor object to work with (QScintilla.Editor)
193 </dd>
194 </dl><dl>
195 <dt>Returns:</dt>
196 <dd>
197 requested character or "", if there are no more (string) and
198 the next position (i.e. pos - 1)
199 </dd>
200 </dl><a NAME="Assistant.__preferencesChanged" ID="Assistant.__preferencesChanged"></a>
201 <h4>Assistant.__preferencesChanged</h4>
202 <b>__preferencesChanged</b>(<i></i>)
203 <p>
204 Private method to handle a change of the global configuration.
205 </p><a NAME="Assistant.__setAutoCompletionHook" ID="Assistant.__setAutoCompletionHook"></a>
206 <h4>Assistant.__setAutoCompletionHook</h4>
207 <b>__setAutoCompletionHook</b>(<i>editor</i>)
208 <p>
209 Private method to set the autocompletion hook.
210 </p><dl>
211 <dt><i>editor</i></dt>
212 <dd>
213 reference to the editor (QScintilla.Editor)
214 </dd>
215 </dl><a NAME="Assistant.__setCalltipsHook" ID="Assistant.__setCalltipsHook"></a>
216 <h4>Assistant.__setCalltipsHook</h4>
217 <b>__setCalltipsHook</b>(<i>editor</i>)
218 <p>
219 Private method to set the calltip hook.
220 </p><dl>
221 <dt><i>editor</i></dt>
222 <dd>
223 reference to the editor (QScintilla.Editor)
224 </dd>
225 </dl><a NAME="Assistant.__shutdown" ID="Assistant.__shutdown"></a>
226 <h4>Assistant.__shutdown</h4>
227 <b>__shutdown</b>(<i></i>)
228 <p>
229 Private slot to handle the shutdown signal.
230 </p><a NAME="Assistant.__unsetAutoCompletionHook" ID="Assistant.__unsetAutoCompletionHook"></a>
231 <h4>Assistant.__unsetAutoCompletionHook</h4>
232 <b>__unsetAutoCompletionHook</b>(<i>editor</i>)
233 <p>
234 Private method to unset the autocompletion hook.
235 </p><dl>
236 <dt><i>editor</i></dt>
237 <dd>
238 reference to the editor (QScintilla.Editor)
239 </dd>
240 </dl><a NAME="Assistant.__unsetCalltipsHook" ID="Assistant.__unsetCalltipsHook"></a>
241 <h4>Assistant.__unsetCalltipsHook</h4>
242 <b>__unsetCalltipsHook</b>(<i>editor</i>)
243 <p>
244 Private method to unset the calltip hook.
245 </p><dl>
246 <dt><i>editor</i></dt>
247 <dd>
248 reference to the editor (QScintilla.Editor)
249 </dd>
250 </dl><a NAME="Assistant.activate" ID="Assistant.activate"></a>
251 <h4>Assistant.activate</h4>
252 <b>activate</b>(<i></i>)
253 <p>
254 Public method to perform actions upon activation.
255 </p><a NAME="Assistant.autocomplete" ID="Assistant.autocomplete"></a>
256 <h4>Assistant.autocomplete</h4>
257 <b>autocomplete</b>(<i>editor, context</i>)
258 <p>
259 Public method to determine the autocompletion proposals.
260 </p><dl>
261 <dt><i>editor</i></dt>
262 <dd>
263 reference to the editor object, that called this method
264 (QScintilla.Editor)
265 </dd><dt><i>context</i></dt>
266 <dd>
267 flag indicating to autocomplete a context (boolean)
268 </dd>
269 </dl><a NAME="Assistant.calltips" ID="Assistant.calltips"></a>
270 <h4>Assistant.calltips</h4>
271 <b>calltips</b>(<i>editor, pos, commas</i>)
272 <p>
273 Public method to return a list of calltips.
274 </p><dl>
275 <dt><i>editor</i></dt>
276 <dd>
277 reference to the editor (QScintilla.Editor)
278 </dd><dt><i>pos</i></dt>
279 <dd>
280 position in the text for the calltip (integer)
281 </dd><dt><i>commas</i></dt>
282 <dd>
283 minimum number of commas contained in the calltip (integer)
284 </dd>
285 </dl><dl>
286 <dt>Returns:</dt>
287 <dd>
288 list of possible calltips (list of strings)
289 </dd>
290 </dl><a NAME="Assistant.deactivate" ID="Assistant.deactivate"></a>
291 <h4>Assistant.deactivate</h4>
292 <b>deactivate</b>(<i></i>)
293 <p>
294 Public method to perform actions upon deactivation.
295 </p><a NAME="Assistant.getCompletionsFromDocument" ID="Assistant.getCompletionsFromDocument"></a>
296 <h4>Assistant.getCompletionsFromDocument</h4>
297 <b>getCompletionsFromDocument</b>(<i>editor, word, context, sep</i>)
298 <p>
299 Public method to determine autocompletion proposals from the document.
300 </p><dl>
301 <dt><i>editor</i></dt>
302 <dd>
303 reference to the editor object (QScintilla.Editor)
304 </dd><dt><i>word</i></dt>
305 <dd>
306 string to be completed (string)
307 </dd><dt><i>context</i></dt>
308 <dd>
309 flag indicating to autocomplete a context (boolean)
310 </dd><dt><i>sep</i></dt>
311 <dd>
312 separator string (string)
313 </dd>
314 </dl><dl>
315 <dt>Returns:</dt>
316 <dd>
317 list of possible completions (list of strings)
318 </dd>
319 </dl><a NAME="Assistant.setEnabled" ID="Assistant.setEnabled"></a>
320 <h4>Assistant.setEnabled</h4>
321 <b>setEnabled</b>(<i>key, enabled</i>)
322 <p>
323 Public method to enable or disable a feature.
324 </p><dl>
325 <dt><i>key</i></dt>
326 <dd>
327 feature to set (string)
328 </dd><dt><i>enabled</i></dt>
329 <dd>
330 flag indicating the status (boolean)
331 </dd>
332 </dl>
333 <div align="right"><a href="#top">Up</a></div>
334 <hr />
335 </body></html>

eric ide

mercurial