Sun, 17 Jan 2010 19:22:18 +0000
First commit after porting to Python3.
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html><head> <title>Plugin_Assistant_Eric.AssistantEric.Assistant</title> <style> body { background:white; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #4FA4FF; } h2 { color: white; background: #4FA4FF; } h3 { color: white; background: #00557F; } h4 { color: white; background: #00557F; } a { color: #AA5500; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>Plugin_Assistant_Eric.AssistantEric.Assistant</h1> <p> Module implementing the eric assistant, an alternative autocompletion and calltips system. </p> <h3>Global Attributes</h3> <table> <tr><td>AcsAPIs</td></tr><tr><td>AcsDocument</td></tr><tr><td>AcsOther</td></tr><tr><td>AcsProject</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#Assistant">Assistant</a></td> <td>Class implementing the autocompletion and calltips system.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="Assistant" ID="Assistant"></a> <h2>Assistant</h2> <p> Class implementing the autocompletion and calltips system. </p> <h3>Derived from</h3> QObject <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#Assistant.__init__">Assistant</a></td> <td>Constructor</td> </tr><tr> <td><a href="#Assistant.__completionListSelected">__completionListSelected</a></td> <td>Private slot to handle the selection from the completion list.</td> </tr><tr> <td><a href="#Assistant.__editorClosed">__editorClosed</a></td> <td>Private slot called, when an editor was closed.</td> </tr><tr> <td><a href="#Assistant.__editorOpened">__editorOpened</a></td> <td>Private slot called, when a new editor was opened.</td> </tr><tr> <td><a href="#Assistant.__getApiCompletions">__getApiCompletions</a></td> <td>Private method to determine a list of completions from an API object.</td> </tr><tr> <td><a href="#Assistant.__getCharacter">__getCharacter</a></td> <td>Private method to get the character to the left of the current position in the current line.</td> </tr><tr> <td><a href="#Assistant.__preferencesChanged">__preferencesChanged</a></td> <td>Private method to handle a change of the global configuration.</td> </tr><tr> <td><a href="#Assistant.__setAutoCompletionHook">__setAutoCompletionHook</a></td> <td>Private method to set the autocompletion hook.</td> </tr><tr> <td><a href="#Assistant.__setCalltipsHook">__setCalltipsHook</a></td> <td>Private method to set the calltip hook.</td> </tr><tr> <td><a href="#Assistant.__shutdown">__shutdown</a></td> <td>Private slot to handle the shutdown signal.</td> </tr><tr> <td><a href="#Assistant.__unsetAutoCompletionHook">__unsetAutoCompletionHook</a></td> <td>Private method to unset the autocompletion hook.</td> </tr><tr> <td><a href="#Assistant.__unsetCalltipsHook">__unsetCalltipsHook</a></td> <td>Private method to unset the calltip hook.</td> </tr><tr> <td><a href="#Assistant.activate">activate</a></td> <td>Public method to perform actions upon activation.</td> </tr><tr> <td><a href="#Assistant.autocomplete">autocomplete</a></td> <td>Public method to determine the autocompletion proposals.</td> </tr><tr> <td><a href="#Assistant.calltips">calltips</a></td> <td>Public method to return a list of calltips.</td> </tr><tr> <td><a href="#Assistant.deactivate">deactivate</a></td> <td>Public method to perform actions upon deactivation.</td> </tr><tr> <td><a href="#Assistant.getCompletionsFromDocument">getCompletionsFromDocument</a></td> <td>Public method to determine autocompletion proposals from the document.</td> </tr><tr> <td><a href="#Assistant.setEnabled">setEnabled</a></td> <td>Public method to enable or disable a feature.</td> </tr> </table> <a NAME="Assistant.__init__" ID="Assistant.__init__"></a> <h4>Assistant (Constructor)</h4> <b>Assistant</b>(<i>plugin, parent = None</i>) <p> Constructor </p><dl> <dt><i>plugin</i></dt> <dd> reference to the plugin object </dd><dt><i>parent</i></dt> <dd> parent (QObject) </dd> </dl><a NAME="Assistant.__completionListSelected" ID="Assistant.__completionListSelected"></a> <h4>Assistant.__completionListSelected</h4> <b>__completionListSelected</b>(<i>id, txt</i>) <p> Private slot to handle the selection from the completion list. </p><dl> <dt><i>id</i></dt> <dd> the ID of the user list (should be 1) (integer) </dd><dt><i>txt</i></dt> <dd> the selected text (string) </dd> </dl><a NAME="Assistant.__editorClosed" ID="Assistant.__editorClosed"></a> <h4>Assistant.__editorClosed</h4> <b>__editorClosed</b>(<i>editor</i>) <p> Private slot called, when an editor was closed. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.__editorOpened" ID="Assistant.__editorOpened"></a> <h4>Assistant.__editorOpened</h4> <b>__editorOpened</b>(<i>editor</i>) <p> Private slot called, when a new editor was opened. </p><dl> <dt><i>editor</i></dt> <dd> reference to the new editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.__getApiCompletions" ID="Assistant.__getApiCompletions"></a> <h4>Assistant.__getApiCompletions</h4> <b>__getApiCompletions</b>(<i>api, word, context</i>) <p> Private method to determine a list of completions from an API object. </p><dl> <dt><i>api</i></dt> <dd> reference to the API object to be used (APIsManager.DbAPIs) </dd><dt><i>word</i></dt> <dd> word (or wordpart) to complete (string) </dd><dt><i>context</i></dt> <dd> flag indicating to autocomplete a context (boolean) </dd> </dl><dl> <dt>Returns:</dt> <dd> list of possible completions (list of strings) </dd> </dl><a NAME="Assistant.__getCharacter" ID="Assistant.__getCharacter"></a> <h4>Assistant.__getCharacter</h4> <b>__getCharacter</b>(<i>pos, editor</i>) <p> Private method to get the character to the left of the current position in the current line. </p><dl> <dt><i>pos</i></dt> <dd> position to get character at (integer) </dd><dt><i>editor</i></dt> <dd> reference to the editor object to work with (QScintilla.Editor) </dd> </dl><dl> <dt>Returns:</dt> <dd> requested character or "", if there are no more (string) and the next position (i.e. pos - 1) </dd> </dl><a NAME="Assistant.__preferencesChanged" ID="Assistant.__preferencesChanged"></a> <h4>Assistant.__preferencesChanged</h4> <b>__preferencesChanged</b>(<i></i>) <p> Private method to handle a change of the global configuration. </p><a NAME="Assistant.__setAutoCompletionHook" ID="Assistant.__setAutoCompletionHook"></a> <h4>Assistant.__setAutoCompletionHook</h4> <b>__setAutoCompletionHook</b>(<i>editor</i>) <p> Private method to set the autocompletion hook. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.__setCalltipsHook" ID="Assistant.__setCalltipsHook"></a> <h4>Assistant.__setCalltipsHook</h4> <b>__setCalltipsHook</b>(<i>editor</i>) <p> Private method to set the calltip hook. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.__shutdown" ID="Assistant.__shutdown"></a> <h4>Assistant.__shutdown</h4> <b>__shutdown</b>(<i></i>) <p> Private slot to handle the shutdown signal. </p><a NAME="Assistant.__unsetAutoCompletionHook" ID="Assistant.__unsetAutoCompletionHook"></a> <h4>Assistant.__unsetAutoCompletionHook</h4> <b>__unsetAutoCompletionHook</b>(<i>editor</i>) <p> Private method to unset the autocompletion hook. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.__unsetCalltipsHook" ID="Assistant.__unsetCalltipsHook"></a> <h4>Assistant.__unsetCalltipsHook</h4> <b>__unsetCalltipsHook</b>(<i>editor</i>) <p> Private method to unset the calltip hook. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="Assistant.activate" ID="Assistant.activate"></a> <h4>Assistant.activate</h4> <b>activate</b>(<i></i>) <p> Public method to perform actions upon activation. </p><a NAME="Assistant.autocomplete" ID="Assistant.autocomplete"></a> <h4>Assistant.autocomplete</h4> <b>autocomplete</b>(<i>editor, context</i>) <p> Public method to determine the autocompletion proposals. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor object, that called this method (QScintilla.Editor) </dd><dt><i>context</i></dt> <dd> flag indicating to autocomplete a context (boolean) </dd> </dl><a NAME="Assistant.calltips" ID="Assistant.calltips"></a> <h4>Assistant.calltips</h4> <b>calltips</b>(<i>editor, pos, commas</i>) <p> Public method to return a list of calltips. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd><dt><i>pos</i></dt> <dd> position in the text for the calltip (integer) </dd><dt><i>commas</i></dt> <dd> minimum number of commas contained in the calltip (integer) </dd> </dl><dl> <dt>Returns:</dt> <dd> list of possible calltips (list of strings) </dd> </dl><a NAME="Assistant.deactivate" ID="Assistant.deactivate"></a> <h4>Assistant.deactivate</h4> <b>deactivate</b>(<i></i>) <p> Public method to perform actions upon deactivation. </p><a NAME="Assistant.getCompletionsFromDocument" ID="Assistant.getCompletionsFromDocument"></a> <h4>Assistant.getCompletionsFromDocument</h4> <b>getCompletionsFromDocument</b>(<i>editor, word, context, sep</i>) <p> Public method to determine autocompletion proposals from the document. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor object (QScintilla.Editor) </dd><dt><i>word</i></dt> <dd> string to be completed (string) </dd><dt><i>context</i></dt> <dd> flag indicating to autocomplete a context (boolean) </dd><dt><i>sep</i></dt> <dd> separator string (string) </dd> </dl><dl> <dt>Returns:</dt> <dd> list of possible completions (list of strings) </dd> </dl><a NAME="Assistant.setEnabled" ID="Assistant.setEnabled"></a> <h4>Assistant.setEnabled</h4> <b>setEnabled</b>(<i>key, enabled</i>) <p> Public method to enable or disable a feature. </p><dl> <dt><i>key</i></dt> <dd> feature to set (string) </dd><dt><i>enabled</i></dt> <dd> flag indicating the status (boolean) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>