Sat, 27 Jun 2015 11:15:48 +0200
Added capability to go to the definition of a class or function by clicking on it (while holding the Ctrl key or another configurable modifier sequence) (needs eric 6.1.0).
<!DOCTYPE html> <html><head> <title>Plugin_Refactoring_Rope.PluginRefactoringRope</title> <meta charset="UTF-8"> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>Plugin_Refactoring_Rope.PluginRefactoringRope</h1> <p> Module implementing the Rope refactoring plugin. </p> <h3>Global Attributes</h3> <table> <tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>doNotCompile</td></tr><tr><td>error</td></tr><tr><td>internalPackages</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>python2Compatible</td></tr><tr><td>refactoringRopePluginObject</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#RefactoringRopePlugin">RefactoringRopePlugin</a></td> <td>Class implementing the Rope refactoring plugin.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#createAutoCompletionPage">createAutoCompletionPage</a></td> <td>Module function to create the autocompletion configuration page.</td> </tr><tr> <td><a href="#createCallTipsPage">createCallTipsPage</a></td> <td>Module function to create the calltips configuration page.</td> </tr><tr> <td><a href="#createMouseClickHandlerPage">createMouseClickHandlerPage</a></td> <td>Module function to create the mouse click handler configuration page.</td> </tr><tr> <td><a href="#getConfigData">getConfigData</a></td> <td>Module function returning data as required by the configuration dialog.</td> </tr><tr> <td><a href="#prepareUninstall">prepareUninstall</a></td> <td>Module function to prepare for an uninstallation.</td> </tr> </table> <hr /><hr /> <a NAME="RefactoringRopePlugin" ID="RefactoringRopePlugin"></a> <h2>RefactoringRopePlugin</h2> <p> Class implementing the Rope refactoring plugin. </p> <h3>Derived from</h3> QObject <h3>Class Attributes</h3> <table> <tr><td>PreferencesKey</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#RefactoringRopePlugin.__init__">RefactoringRopePlugin</a></td> <td>Constructor</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__checkUiVersion">__checkUiVersion</a></td> <td>Private method to check, if the IDE has a suitable version.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__codeAssist">__codeAssist</a></td> <td>Private slot to show a list with completion proposals.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__completionListSelected">__completionListSelected</a></td> <td>Private slot to handle the selection from the completion list.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__connectEditor">__connectEditor</a></td> <td>Private method to connect an editor.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__connectMouseClickHandler">__connectMouseClickHandler</a></td> <td>Private method to connect the mouse click handler to an editor.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__determineLanguage">__determineLanguage</a></td> <td>Private method to determine the valid language strings.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__disconnectEditor">__disconnectEditor</a></td> <td>Private method to disconnect an editor.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__disconnectMouseClickHandler">__disconnectMouseClickHandler</a></td> <td>Private method to disconnect the mouse click handler from an editor.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__editorAboutToBeSaved">__editorAboutToBeSaved</a></td> <td>Private slot to get the old contents of the named file.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__editorClosed">__editorClosed</a></td> <td>Private slot called, when an editor was closed.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__editorLanguageChanged">__editorLanguageChanged</a></td> <td>Private slot to handle the language change of an editor.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__editorOpened">__editorOpened</a></td> <td>Private slot called, when a new editor was opened.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__editorSaved">__editorSaved</a></td> <td>Private slot to activate SOA.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__initialize">__initialize</a></td> <td>Private slot to (re)initialize the plugin.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__loadTranslator">__loadTranslator</a></td> <td>Private method to load the translation file.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__projectClosed">__projectClosed</a></td> <td>Private slot to handle the projectClosed signal.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__projectOpened">__projectOpened</a></td> <td>Private slot to handle the projectOpened signal.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__setAutoCompletionHook">__setAutoCompletionHook</a></td> <td>Private method to set the autocompletion hook.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__setCalltipsHook">__setCalltipsHook</a></td> <td>Private method to set the calltip hook.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__unsetAutoCompletionHook">__unsetAutoCompletionHook</a></td> <td>Private method to unset the autocompletion hook.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.__unsetCalltipsHook">__unsetCalltipsHook</a></td> <td>Private method to unset the calltip hook.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.activate">activate</a></td> <td>Public method to activate this plugin.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.codeAssist">codeAssist</a></td> <td>Public method to determine the autocompletion proposals.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.codeAssistCallTip">codeAssistCallTip</a></td> <td>Public method to return a list of calltips.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.deactivate">deactivate</a></td> <td>Public method to deactivate this plugin.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.getCompletionsList">getCompletionsList</a></td> <td>Public method to get a list of possible completions.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.getPreferences">getPreferences</a></td> <td>Public method to retrieve the various refactoring settings.</td> </tr><tr> <td><a href="#RefactoringRopePlugin.setPreferences">setPreferences</a></td> <td>Public method to store the various refactoring settings.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="RefactoringRopePlugin.__init__" ID="RefactoringRopePlugin.__init__"></a> <h4>RefactoringRopePlugin (Constructor)</h4> <b>RefactoringRopePlugin</b>(<i>ui</i>) <p> Constructor </p><dl> <dt><i>ui</i></dt> <dd> reference to the user interface object (UI.UserInterface) </dd> </dl><a NAME="RefactoringRopePlugin.__checkUiVersion" ID="RefactoringRopePlugin.__checkUiVersion"></a> <h4>RefactoringRopePlugin.__checkUiVersion</h4> <b>__checkUiVersion</b>(<i></i>) <p> Private method to check, if the IDE has a suitable version. </p><dl> <dt>Returns:</dt> <dd> flag indicating a suitable version (boolean) </dd> </dl><a NAME="RefactoringRopePlugin.__codeAssist" ID="RefactoringRopePlugin.__codeAssist"></a> <h4>RefactoringRopePlugin.__codeAssist</h4> <b>__codeAssist</b>(<i></i>) <p> Private slot to show a list with completion proposals. </p><a NAME="RefactoringRopePlugin.__completionListSelected" ID="RefactoringRopePlugin.__completionListSelected"></a> <h4>RefactoringRopePlugin.__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 (QString) </dd> </dl><a NAME="RefactoringRopePlugin.__connectEditor" ID="RefactoringRopePlugin.__connectEditor"></a> <h4>RefactoringRopePlugin.__connectEditor</h4> <b>__connectEditor</b>(<i>editor</i>) <p> Private method to connect an editor. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="RefactoringRopePlugin.__connectMouseClickHandler" ID="RefactoringRopePlugin.__connectMouseClickHandler"></a> <h4>RefactoringRopePlugin.__connectMouseClickHandler</h4> <b>__connectMouseClickHandler</b>(<i>editor</i>) <p> Private method to connect the mouse click handler to an editor. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="RefactoringRopePlugin.__determineLanguage" ID="RefactoringRopePlugin.__determineLanguage"></a> <h4>RefactoringRopePlugin.__determineLanguage</h4> <b>__determineLanguage</b>(<i></i>) <p> Private method to determine the valid language strings. </p><dl> <dt>Returns:</dt> <dd> list of valid language strings (list of string) </dd> </dl><a NAME="RefactoringRopePlugin.__disconnectEditor" ID="RefactoringRopePlugin.__disconnectEditor"></a> <h4>RefactoringRopePlugin.__disconnectEditor</h4> <b>__disconnectEditor</b>(<i>editor</i>) <p> Private method to disconnect an editor. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="RefactoringRopePlugin.__disconnectMouseClickHandler" ID="RefactoringRopePlugin.__disconnectMouseClickHandler"></a> <h4>RefactoringRopePlugin.__disconnectMouseClickHandler</h4> <b>__disconnectMouseClickHandler</b>(<i>editor</i>) <p> Private method to disconnect the mouse click handler from an editor. </p><dl> <dt><i>editor</i></dt> <dd> reference to the editor (QScintilla.Editor) </dd> </dl><a NAME="RefactoringRopePlugin.__editorAboutToBeSaved" ID="RefactoringRopePlugin.__editorAboutToBeSaved"></a> <h4>RefactoringRopePlugin.__editorAboutToBeSaved</h4> <b>__editorAboutToBeSaved</b>(<i>filename</i>) <p> Private slot to get the old contents of the named file. </p><dl> <dt><i>filename</i></dt> <dd> name of the file about to be saved (string) </dd> </dl><a NAME="RefactoringRopePlugin.__editorClosed" ID="RefactoringRopePlugin.__editorClosed"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.__editorLanguageChanged" ID="RefactoringRopePlugin.__editorLanguageChanged"></a> <h4>RefactoringRopePlugin.__editorLanguageChanged</h4> <b>__editorLanguageChanged</b>(<i>language</i>) <p> Private slot to handle the language change of an editor. </p><dl> <dt><i>language</i></dt> <dd> programming language of the editor (string) </dd> </dl><a NAME="RefactoringRopePlugin.__editorOpened" ID="RefactoringRopePlugin.__editorOpened"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.__editorSaved" ID="RefactoringRopePlugin.__editorSaved"></a> <h4>RefactoringRopePlugin.__editorSaved</h4> <b>__editorSaved</b>(<i>filename</i>) <p> Private slot to activate SOA. </p><dl> <dt><i>filename</i></dt> <dd> name of the file that was saved (string) </dd> </dl><a NAME="RefactoringRopePlugin.__initialize" ID="RefactoringRopePlugin.__initialize"></a> <h4>RefactoringRopePlugin.__initialize</h4> <b>__initialize</b>(<i></i>) <p> Private slot to (re)initialize the plugin. </p><a NAME="RefactoringRopePlugin.__loadTranslator" ID="RefactoringRopePlugin.__loadTranslator"></a> <h4>RefactoringRopePlugin.__loadTranslator</h4> <b>__loadTranslator</b>(<i></i>) <p> Private method to load the translation file. </p><a NAME="RefactoringRopePlugin.__projectClosed" ID="RefactoringRopePlugin.__projectClosed"></a> <h4>RefactoringRopePlugin.__projectClosed</h4> <b>__projectClosed</b>(<i></i>) <p> Private slot to handle the projectClosed signal. </p><a NAME="RefactoringRopePlugin.__projectOpened" ID="RefactoringRopePlugin.__projectOpened"></a> <h4>RefactoringRopePlugin.__projectOpened</h4> <b>__projectOpened</b>(<i></i>) <p> Private slot to handle the projectOpened signal. </p><a NAME="RefactoringRopePlugin.__setAutoCompletionHook" ID="RefactoringRopePlugin.__setAutoCompletionHook"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.__setCalltipsHook" ID="RefactoringRopePlugin.__setCalltipsHook"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.__unsetAutoCompletionHook" ID="RefactoringRopePlugin.__unsetAutoCompletionHook"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.__unsetCalltipsHook" ID="RefactoringRopePlugin.__unsetCalltipsHook"></a> <h4>RefactoringRopePlugin.__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="RefactoringRopePlugin.activate" ID="RefactoringRopePlugin.activate"></a> <h4>RefactoringRopePlugin.activate</h4> <b>activate</b>(<i></i>) <p> Public method to activate this plugin. </p><dl> <dt>Returns:</dt> <dd> tuple of None and activation status (boolean) </dd> </dl><a NAME="RefactoringRopePlugin.codeAssist" ID="RefactoringRopePlugin.codeAssist"></a> <h4>RefactoringRopePlugin.codeAssist</h4> <b>codeAssist</b>(<i>editor, context=False</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="RefactoringRopePlugin.codeAssistCallTip" ID="RefactoringRopePlugin.codeAssistCallTip"></a> <h4>RefactoringRopePlugin.codeAssistCallTip</h4> <b>codeAssistCallTip</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="RefactoringRopePlugin.deactivate" ID="RefactoringRopePlugin.deactivate"></a> <h4>RefactoringRopePlugin.deactivate</h4> <b>deactivate</b>(<i></i>) <p> Public method to deactivate this plugin. </p><a NAME="RefactoringRopePlugin.getCompletionsList" ID="RefactoringRopePlugin.getCompletionsList"></a> <h4>RefactoringRopePlugin.getCompletionsList</h4> <b>getCompletionsList</b>(<i>editor, context</i>) <p> Public method to get a list of possible completions. </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><dl> <dt>Returns:</dt> <dd> list of possible completions (list of strings) </dd> </dl><a NAME="RefactoringRopePlugin.getPreferences" ID="RefactoringRopePlugin.getPreferences"></a> <h4>RefactoringRopePlugin.getPreferences</h4> <b>getPreferences</b>(<i>key</i>) <p> Public method to retrieve the various refactoring settings. </p><dl> <dt><i>key</i></dt> <dd> the key of the value to get </dd> </dl><dl> <dt>Returns:</dt> <dd> the requested refactoring setting </dd> </dl><a NAME="RefactoringRopePlugin.setPreferences" ID="RefactoringRopePlugin.setPreferences"></a> <h4>RefactoringRopePlugin.setPreferences</h4> <b>setPreferences</b>(<i>key, value</i>) <p> Public method to store the various refactoring settings. </p><dl> <dt><i>key</i></dt> <dd> the key of the setting to be set (string) </dd><dt><i>value</i></dt> <dd> the value to be set </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="createAutoCompletionPage" ID="createAutoCompletionPage"></a> <h2>createAutoCompletionPage</h2> <b>createAutoCompletionPage</b>(<i>configDlg</i>) <p> Module function to create the autocompletion configuration page. </p><dl> <dt><i>configDlg</i></dt> <dd> reference to the configuration dialog </dd> </dl><dl> <dt>Returns:</dt> <dd> reference to the configuration page </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="createCallTipsPage" ID="createCallTipsPage"></a> <h2>createCallTipsPage</h2> <b>createCallTipsPage</b>(<i>configDlg</i>) <p> Module function to create the calltips configuration page. </p><dl> <dt><i>configDlg</i></dt> <dd> reference to the configuration dialog </dd> </dl><dl> <dt>Returns:</dt> <dd> reference to the configuration page </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="createMouseClickHandlerPage" ID="createMouseClickHandlerPage"></a> <h2>createMouseClickHandlerPage</h2> <b>createMouseClickHandlerPage</b>(<i>configDlg</i>) <p> Module function to create the mouse click handler configuration page. </p><dl> <dt><i>configDlg</i></dt> <dd> reference to the configuration dialog </dd> </dl><dl> <dt>Returns:</dt> <dd> reference to the configuration page </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="getConfigData" ID="getConfigData"></a> <h2>getConfigData</h2> <b>getConfigData</b>(<i></i>) <p> Module function returning data as required by the configuration dialog. </p><dl> <dt>Returns:</dt> <dd> dictionary containing the relevant data </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> <a NAME="prepareUninstall" ID="prepareUninstall"></a> <h2>prepareUninstall</h2> <b>prepareUninstall</b>(<i></i>) <p> Module function to prepare for an uninstallation. </p> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>