RefactoringRope/Documentation/source/Plugin_Refactoring_Rope.RefactoringRope.RefactoringServer.html

Mon, 17 Oct 2022 16:45:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 17 Oct 2022 16:45:23 +0200
branch
eric7
changeset 394
b34f5dd3db27
parent 375
c61a2f18ed78
child 416
45159308166f
permissions
-rw-r--r--

Enhanced the default configuration handling (for refactoring and code assist).

<!DOCTYPE html>
<html><head>
<title>Plugin_Refactoring_Rope.RefactoringRope.RefactoringServer</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>Plugin_Refactoring_Rope.RefactoringRope.RefactoringServer</h1>

<p>
Module implementing the refactoring interface to rope.
</p>
<h3>Global Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>

<table>

<tr>
<td><a href="#RefactoringServer">RefactoringServer</a></td>
<td>Class implementing the refactoring interface to rope.</td>
</tr>
</table>
<h3>Functions</h3>

<table>
<tr><td>None</td></tr>
</table>
<hr />
<hr />
<a NAME="RefactoringServer" ID="RefactoringServer"></a>
<h2>RefactoringServer</h2>

<p>
    Class implementing the refactoring interface to rope.
</p>
<h3>Derived from</h3>
EricJsonServer
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#RefactoringServer.__init__">RefactoringServer</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__changeOccurrences">__changeOccurrences</a></td>
<td>Private slot to perform the Change Occurrences refactoring.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__changeSignature">__changeSignature</a></td>
<td>Private slot to change the signature of a method or function.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__clearHistory">__clearHistory</a></td>
<td>Private slot to clear the redo and undo lists.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__configChanged">__configChanged</a></td>
<td>Private slot called, when the rope config file has changed.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__convertLocalToAttribute">__convertLocalToAttribute</a></td>
<td>Private slot to convert a local variable to an attribute.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__defaultConfig">__defaultConfig</a></td>
<td>Private slot to return the contents of rope's default configuration.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__doExtract">__doExtract</a></td>
<td>Private method to perform the extract refactoring.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__doImports">__doImports</a></td>
<td>Private method to perform the various imports refactorings.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__doRename">__doRename</a></td>
<td>Private method to perform the various renaming refactorings.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__editConfig">__editConfig</a></td>
<td>Private slot to open the rope configuration file in an editor.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__encapsulateAttribute">__encapsulateAttribute</a></td>
<td>Private slot to encapsulate an attribute.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__extractLocalVariable">__extractLocalVariable</a></td>
<td>Private slot to handle the Extract Local Variable action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__extractMethod">__extractMethod</a></td>
<td>Private slot to handle the Extract Method action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__getOffset">__getOffset</a></td>
<td>Private method to get the offset into the text treating CRLF as ONE character.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__historyDialogClosed">__historyDialogClosed</a></td>
<td>Private slot handling the closing of the history dialog.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__importsExpandStar">__importsExpandStar</a></td>
<td>Private slot to expand star imports.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__importsFromToImport">__importsFromToImport</a></td>
<td>Private slot to transform from imports to plain imports.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__importsHandleLong">__importsHandleLong</a></td>
<td>Private slot to handle long imports.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__importsOrganize">__importsOrganize</a></td>
<td>Private slot to organize imports.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__importsRelativeToAbsolute">__importsRelativeToAbsolute</a></td>
<td>Private slot to transform relative to absolute imports.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__initActions">__initActions</a></td>
<td>Private method to define the refactoring actions.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__initMenu">__initMenu</a></td>
<td>Private slot to initialize the refactoring menu.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__inline">__inline</a></td>
<td>Private slot to handle the Inline Local Variable action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__inlineArgumentDefault">__inlineArgumentDefault</a></td>
<td>Private slot to inline the default value of a parameter of a method or function.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__introduceFactoryMethod">__introduceFactoryMethod</a></td>
<td>Private slot to introduce a factory method or global function.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__introduceParameter">__introduceParameter</a></td>
<td>Private slot to introduce a parameter in a function.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__methodToMethodObject">__methodToMethodObject</a></td>
<td>Private slot to change the signature of a method or function.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__move">__move</a></td>
<td>Private slot to handle the Move Method action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__performSOA">__performSOA</a></td>
<td>Private slot to perform SOA on all modules.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__processChanges">__processChanges</a></td>
<td>Private method to process the changes data sent by the refactoring client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__processClientException">__processClientException</a></td>
<td>Private method to handle exceptions of the refactoring client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__processHistoryResult">__processHistoryResult</a></td>
<td>Private method to process the history data sent by the refactoring client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__processProgress">__processProgress</a></td>
<td>Private method to handle Progress commands.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryDefinition">__queryDefinition</a></td>
<td>Private slot to handle the Find Definition action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryDefinitionResult">__queryDefinitionResult</a></td>
<td>Private method to handle the "Query Definition" result sent by the client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryImplementations">__queryImplementations</a></td>
<td>Private slot to handle the Find Implementations action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryImplementationsResult">__queryImplementationsResult</a></td>
<td>Private method to handle the "Query Implementations" result sent by the client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryReferences">__queryReferences</a></td>
<td>Private slot to handle the Find References action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__queryReferencesResult">__queryReferencesResult</a></td>
<td>Private method to handle the "Query References" result sent by the client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__refactoringDialogClosed">__refactoringDialogClosed</a></td>
<td>Private slot handling the closing of a refactoring dialog.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__rename">__rename</a></td>
<td>Private slot to handle the Rename action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__renameLocal">__renameLocal</a></td>
<td>Private slot to handle the Local Rename action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__renameModule">__renameModule</a></td>
<td>Private slot to handle the Rename Current Module action.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__restructure">__restructure</a></td>
<td>Private slot to restructure code.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__ropeConfigFile">__ropeConfigFile</a></td>
<td>Private method to get the name of the rope configuration file.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__ropeInfo">__ropeInfo</a></td>
<td>Private slot to show some info about rope.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__setConfig">__setConfig</a></td>
<td>Private method to set the rope client configuration data.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__showFileHistory">__showFileHistory</a></td>
<td>Private method to show the refactoring history of the current file.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__showProjectHistory">__showProjectHistory</a></td>
<td>Private method to show the project refactoring history.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__showRefactoringHistoryMenu">__showRefactoringHistoryMenu</a></td>
<td>Private slot called before the refactoring history menu is shown.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__showRopeHelp">__showRopeHelp</a></td>
<td>Private slot to show help about the refactorings offered by Rope.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__soaFinished">__soaFinished</a></td>
<td>Private method to handle the "Soa Finished" result sent by the client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__startRefactoringClient">__startRefactoringClient</a></td>
<td>Private method to start the refactoring client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__transformModuleToPackage">__transformModuleToPackage</a></td>
<td>Private slot to transform a module to a package.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__updateConfig">__updateConfig</a></td>
<td>Private slot to update the configuration file.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.__useFunction">__useFunction</a></td>
<td>Private slot to use a function wherever possible.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.activate">activate</a></td>
<td>Public method to activate the refactoring server.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.confirmAllBuffersSaved">confirmAllBuffersSaved</a></td>
<td>Public method to check, if any editor has unsaved changes.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.confirmBufferIsSaved">confirmBufferIsSaved</a></td>
<td>Public method to check, if an editor has unsaved changes.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.deactivate">deactivate</a></td>
<td>Public method to deactivate the refactoring server.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.getActions">getActions</a></td>
<td>Public method to get a list of all actions.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.getMainWindow">getMainWindow</a></td>
<td>Public method to get a reference to the IDE main window.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.handleCall">handleCall</a></td>
<td>Public method to handle a method call from the client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.handleNewConnection">handleNewConnection</a></td>
<td>Public slot for new incoming connections from a client.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.handleRopeError">handleRopeError</a></td>
<td>Public method to handle a rope error.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.projectClosed">projectClosed</a></td>
<td>Public slot to handle the projectClosed signal.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.projectOpened">projectOpened</a></td>
<td>Public slot to handle the projectOpened signal.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.refreshEditors">refreshEditors</a></td>
<td>Public method to refresh modified editors.</td>
</tr>
<tr>
<td><a href="#RefactoringServer.reportChanged">reportChanged</a></td>
<td>Public slot to report some changed sources.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="RefactoringServer.__init__" ID="RefactoringServer.__init__"></a>
<h4>RefactoringServer (Constructor)</h4>
<b>RefactoringServer</b>(<i>plugin, parent=None</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>plugin</i> (RefactoringRopePlugin)</dt>
<dd>
reference to the plugin object
</dd>
<dt><i>parent</i> (QObject)</dt>
<dd>
parent
</dd>
</dl>
<a NAME="RefactoringServer.__changeOccurrences" ID="RefactoringServer.__changeOccurrences"></a>
<h4>RefactoringServer.__changeOccurrences</h4>
<b>__changeOccurrences</b>(<i></i>)

<p>
        Private slot to perform the Change Occurrences refactoring.
</p>
<a NAME="RefactoringServer.__changeSignature" ID="RefactoringServer.__changeSignature"></a>
<h4>RefactoringServer.__changeSignature</h4>
<b>__changeSignature</b>(<i></i>)

<p>
        Private slot to change the signature of a method or function.
</p>
<a NAME="RefactoringServer.__clearHistory" ID="RefactoringServer.__clearHistory"></a>
<h4>RefactoringServer.__clearHistory</h4>
<b>__clearHistory</b>(<i></i>)

<p>
        Private slot to clear the redo and undo lists.
</p>
<a NAME="RefactoringServer.__configChanged" ID="RefactoringServer.__configChanged"></a>
<h4>RefactoringServer.__configChanged</h4>
<b>__configChanged</b>(<i></i>)

<p>
        Private slot called, when the rope config file has changed.
</p>
<a NAME="RefactoringServer.__convertLocalToAttribute" ID="RefactoringServer.__convertLocalToAttribute"></a>
<h4>RefactoringServer.__convertLocalToAttribute</h4>
<b>__convertLocalToAttribute</b>(<i></i>)

<p>
        Private slot to convert a local variable to an attribute.
</p>
<a NAME="RefactoringServer.__defaultConfig" ID="RefactoringServer.__defaultConfig"></a>
<h4>RefactoringServer.__defaultConfig</h4>
<b>__defaultConfig</b>(<i></i>)

<p>
        Private slot to return the contents of rope's default configuration.
</p>
<dl>
<dt>Return:</dt>
<dd>
string containing the source of rope's default
            configuration
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="RefactoringServer.__doExtract" ID="RefactoringServer.__doExtract"></a>
<h4>RefactoringServer.__doExtract</h4>
<b>__doExtract</b>(<i>title, kind</i>)

<p>
        Private method to perform the extract refactoring.
</p>
<dl>

<dt><i>title</i> (str)</dt>
<dd>
title of the refactoring
</dd>
<dt><i>kind</i> (str ("method" or "variable"))</dt>
<dd>
kind of extraction to be done
</dd>
</dl>
<a NAME="RefactoringServer.__doImports" ID="RefactoringServer.__doImports"></a>
<h4>RefactoringServer.__doImports</h4>
<b>__doImports</b>(<i>title, methodName</i>)

<p>
        Private method to perform the various imports refactorings.
</p>
<dl>

<dt><i>title</i> (str)</dt>
<dd>
title to be used for the import refactoring
</dd>
<dt><i>methodName</i> (str)</dt>
<dd>
name of the method performing the import refactoring
</dd>
</dl>
<a NAME="RefactoringServer.__doRename" ID="RefactoringServer.__doRename"></a>
<h4>RefactoringServer.__doRename</h4>
<b>__doRename</b>(<i>title, isLocal=False, renameModule=False</i>)

<p>
        Private method to perform the various renaming refactorings.
</p>
<dl>

<dt><i>title</i> (str)</dt>
<dd>
title of the refactoring
</dd>
<dt><i>isLocal</i> (bool)</dt>
<dd>
flag indicating to restrict refactoring to
            the local file
</dd>
<dt><i>renameModule</i> (bool)</dt>
<dd>
flag indicating a module rename refactoring
</dd>
</dl>
<a NAME="RefactoringServer.__editConfig" ID="RefactoringServer.__editConfig"></a>
<h4>RefactoringServer.__editConfig</h4>
<b>__editConfig</b>(<i></i>)

<p>
        Private slot to open the rope configuration file in an editor.
</p>
<a NAME="RefactoringServer.__encapsulateAttribute" ID="RefactoringServer.__encapsulateAttribute"></a>
<h4>RefactoringServer.__encapsulateAttribute</h4>
<b>__encapsulateAttribute</b>(<i></i>)

<p>
        Private slot to encapsulate an attribute.
</p>
<a NAME="RefactoringServer.__extractLocalVariable" ID="RefactoringServer.__extractLocalVariable"></a>
<h4>RefactoringServer.__extractLocalVariable</h4>
<b>__extractLocalVariable</b>(<i></i>)

<p>
        Private slot to handle the Extract Local Variable action.
</p>
<a NAME="RefactoringServer.__extractMethod" ID="RefactoringServer.__extractMethod"></a>
<h4>RefactoringServer.__extractMethod</h4>
<b>__extractMethod</b>(<i></i>)

<p>
        Private slot to handle the Extract Method action.
</p>
<a NAME="RefactoringServer.__getOffset" ID="RefactoringServer.__getOffset"></a>
<h4>RefactoringServer.__getOffset</h4>
<b>__getOffset</b>(<i>editor, line, index</i>)

<p>
        Private method to get the offset into the text treating CRLF as ONE
        character.
</p>
<p>
        Note: rope seems to convert all EOL styles to just \n.
</p>
<dl>

<dt><i>editor</i> (Editor)</dt>
<dd>
reference to the editor
</dd>
<dt><i>line</i> (int)</dt>
<dd>
line for the offset
</dd>
<dt><i>index</i> (int)</dt>
<dd>
index into line for the offset
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
rope compliant offset into the file
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
int
</dd>
</dl>
<a NAME="RefactoringServer.__historyDialogClosed" ID="RefactoringServer.__historyDialogClosed"></a>
<h4>RefactoringServer.__historyDialogClosed</h4>
<b>__historyDialogClosed</b>(<i></i>)

<p>
        Private slot handling the closing of the history dialog.
</p>
<a NAME="RefactoringServer.__importsExpandStar" ID="RefactoringServer.__importsExpandStar"></a>
<h4>RefactoringServer.__importsExpandStar</h4>
<b>__importsExpandStar</b>(<i></i>)

<p>
        Private slot to expand star imports.
</p>
<a NAME="RefactoringServer.__importsFromToImport" ID="RefactoringServer.__importsFromToImport"></a>
<h4>RefactoringServer.__importsFromToImport</h4>
<b>__importsFromToImport</b>(<i></i>)

<p>
        Private slot to transform from imports to plain imports.
</p>
<a NAME="RefactoringServer.__importsHandleLong" ID="RefactoringServer.__importsHandleLong"></a>
<h4>RefactoringServer.__importsHandleLong</h4>
<b>__importsHandleLong</b>(<i></i>)

<p>
        Private slot to handle long imports.
</p>
<a NAME="RefactoringServer.__importsOrganize" ID="RefactoringServer.__importsOrganize"></a>
<h4>RefactoringServer.__importsOrganize</h4>
<b>__importsOrganize</b>(<i></i>)

<p>
        Private slot to organize imports.
</p>
<a NAME="RefactoringServer.__importsRelativeToAbsolute" ID="RefactoringServer.__importsRelativeToAbsolute"></a>
<h4>RefactoringServer.__importsRelativeToAbsolute</h4>
<b>__importsRelativeToAbsolute</b>(<i></i>)

<p>
        Private slot to transform relative to absolute imports.
</p>
<a NAME="RefactoringServer.__initActions" ID="RefactoringServer.__initActions"></a>
<h4>RefactoringServer.__initActions</h4>
<b>__initActions</b>(<i></i>)

<p>
        Private method to define the refactoring actions.
</p>
<a NAME="RefactoringServer.__initMenu" ID="RefactoringServer.__initMenu"></a>
<h4>RefactoringServer.__initMenu</h4>
<b>__initMenu</b>(<i></i>)

<p>
        Private slot to initialize the refactoring menu.
</p>
<dl>
<dt>Return:</dt>
<dd>
the menu generated
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
QMenu
</dd>
</dl>
<a NAME="RefactoringServer.__inline" ID="RefactoringServer.__inline"></a>
<h4>RefactoringServer.__inline</h4>
<b>__inline</b>(<i></i>)

<p>
        Private slot to handle the Inline Local Variable action.
</p>
<a NAME="RefactoringServer.__inlineArgumentDefault" ID="RefactoringServer.__inlineArgumentDefault"></a>
<h4>RefactoringServer.__inlineArgumentDefault</h4>
<b>__inlineArgumentDefault</b>(<i></i>)

<p>
        Private slot to inline the default value of a parameter of a
        method or function.
</p>
<a NAME="RefactoringServer.__introduceFactoryMethod" ID="RefactoringServer.__introduceFactoryMethod"></a>
<h4>RefactoringServer.__introduceFactoryMethod</h4>
<b>__introduceFactoryMethod</b>(<i></i>)

<p>
        Private slot to introduce a factory method or global function.
</p>
<a NAME="RefactoringServer.__introduceParameter" ID="RefactoringServer.__introduceParameter"></a>
<h4>RefactoringServer.__introduceParameter</h4>
<b>__introduceParameter</b>(<i></i>)

<p>
        Private slot to introduce a parameter in a function.
</p>
<a NAME="RefactoringServer.__methodToMethodObject" ID="RefactoringServer.__methodToMethodObject"></a>
<h4>RefactoringServer.__methodToMethodObject</h4>
<b>__methodToMethodObject</b>(<i></i>)

<p>
        Private slot to change the signature of a method or function.
</p>
<a NAME="RefactoringServer.__move" ID="RefactoringServer.__move"></a>
<h4>RefactoringServer.__move</h4>
<b>__move</b>(<i>moveKind</i>)

<p>
        Private slot to handle the Move Method action.
</p>
<dl>

<dt><i>moveKind</i> (str (one of 'move_method' or 'move_module'))</dt>
<dd>
kind of move to be performed
</dd>
</dl>
<a NAME="RefactoringServer.__performSOA" ID="RefactoringServer.__performSOA"></a>
<h4>RefactoringServer.__performSOA</h4>
<b>__performSOA</b>(<i></i>)

<p>
        Private slot to perform SOA on all modules.
</p>
<a NAME="RefactoringServer.__processChanges" ID="RefactoringServer.__processChanges"></a>
<h4>RefactoringServer.__processChanges</h4>
<b>__processChanges</b>(<i>result</i>)

<p>
        Private method to process the changes data sent by the refactoring
        client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the changes data
</dd>
</dl>
<a NAME="RefactoringServer.__processClientException" ID="RefactoringServer.__processClientException"></a>
<h4>RefactoringServer.__processClientException</h4>
<b>__processClientException</b>(<i>params</i>)

<p>
        Private method to handle exceptions of the refactoring client.
</p>
<dl>

<dt><i>params</i> (dict)</dt>
<dd>
dictionary containing the exception data
</dd>
</dl>
<a NAME="RefactoringServer.__processHistoryResult" ID="RefactoringServer.__processHistoryResult"></a>
<h4>RefactoringServer.__processHistoryResult</h4>
<b>__processHistoryResult</b>(<i>result</i>)

<p>
        Private method to process the history data sent by the refactoring
        client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the history data
</dd>
</dl>
<a NAME="RefactoringServer.__processProgress" ID="RefactoringServer.__processProgress"></a>
<h4>RefactoringServer.__processProgress</h4>
<b>__processProgress</b>(<i>params</i>)

<p>
        Private method to handle Progress commands.
</p>
<dl>

<dt><i>params</i> (dict)</dt>
<dd>
dictionary containing the progress data
</dd>
</dl>
<a NAME="RefactoringServer.__queryDefinition" ID="RefactoringServer.__queryDefinition"></a>
<h4>RefactoringServer.__queryDefinition</h4>
<b>__queryDefinition</b>(<i></i>)

<p>
        Private slot to handle the Find Definition action.
</p>
<a NAME="RefactoringServer.__queryDefinitionResult" ID="RefactoringServer.__queryDefinitionResult"></a>
<h4>RefactoringServer.__queryDefinitionResult</h4>
<b>__queryDefinitionResult</b>(<i>result</i>)

<p>
        Private method to handle the "Query Definition" result sent by
        the client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the result data
</dd>
</dl>
<a NAME="RefactoringServer.__queryImplementations" ID="RefactoringServer.__queryImplementations"></a>
<h4>RefactoringServer.__queryImplementations</h4>
<b>__queryImplementations</b>(<i></i>)

<p>
        Private slot to handle the Find Implementations action.
</p>
<a NAME="RefactoringServer.__queryImplementationsResult" ID="RefactoringServer.__queryImplementationsResult"></a>
<h4>RefactoringServer.__queryImplementationsResult</h4>
<b>__queryImplementationsResult</b>(<i>result</i>)

<p>
        Private method to handle the "Query Implementations" result sent by
        the client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the result data
</dd>
</dl>
<a NAME="RefactoringServer.__queryReferences" ID="RefactoringServer.__queryReferences"></a>
<h4>RefactoringServer.__queryReferences</h4>
<b>__queryReferences</b>(<i></i>)

<p>
        Private slot to handle the Find References action.
</p>
<a NAME="RefactoringServer.__queryReferencesResult" ID="RefactoringServer.__queryReferencesResult"></a>
<h4>RefactoringServer.__queryReferencesResult</h4>
<b>__queryReferencesResult</b>(<i>result</i>)

<p>
        Private method to handle the "Query References" result sent by
        the client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the result data
</dd>
</dl>
<a NAME="RefactoringServer.__refactoringDialogClosed" ID="RefactoringServer.__refactoringDialogClosed"></a>
<h4>RefactoringServer.__refactoringDialogClosed</h4>
<b>__refactoringDialogClosed</b>(<i>changeGroup</i>)

<p>
        Private slot handling the closing of a refactoring dialog.
</p>
<dl>

<dt><i>changeGroup</i> (str)</dt>
<dd>
name of the refactoring change group the dialog
            belonged to
</dd>
</dl>
<a NAME="RefactoringServer.__rename" ID="RefactoringServer.__rename"></a>
<h4>RefactoringServer.__rename</h4>
<b>__rename</b>(<i></i>)

<p>
        Private slot to handle the Rename action.
</p>
<a NAME="RefactoringServer.__renameLocal" ID="RefactoringServer.__renameLocal"></a>
<h4>RefactoringServer.__renameLocal</h4>
<b>__renameLocal</b>(<i></i>)

<p>
        Private slot to handle the Local Rename action.
</p>
<a NAME="RefactoringServer.__renameModule" ID="RefactoringServer.__renameModule"></a>
<h4>RefactoringServer.__renameModule</h4>
<b>__renameModule</b>(<i></i>)

<p>
        Private slot to handle the Rename Current Module action.
</p>
<a NAME="RefactoringServer.__restructure" ID="RefactoringServer.__restructure"></a>
<h4>RefactoringServer.__restructure</h4>
<b>__restructure</b>(<i></i>)

<p>
        Private slot to restructure code.
</p>
<a NAME="RefactoringServer.__ropeConfigFile" ID="RefactoringServer.__ropeConfigFile"></a>
<h4>RefactoringServer.__ropeConfigFile</h4>
<b>__ropeConfigFile</b>(<i>writing=False</i>)

<p>
        Private method to get the name of the rope configuration file.
</p>
<dl>

<dt><i>writing</i> (bool (optional))</dt>
<dd>
flag indicating to get the name for writing (defaults to False)
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
name of the rope configuration file
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="RefactoringServer.__ropeInfo" ID="RefactoringServer.__ropeInfo"></a>
<h4>RefactoringServer.__ropeInfo</h4>
<b>__ropeInfo</b>(<i></i>)

<p>
        Private slot to show some info about rope.
</p>
<a NAME="RefactoringServer.__setConfig" ID="RefactoringServer.__setConfig"></a>
<h4>RefactoringServer.__setConfig</h4>
<b>__setConfig</b>(<i>params</i>)

<p>
        Private method to set the rope client configuration data.
</p>
<dl>

<dt><i>params</i> (dict)</dt>
<dd>
dictionary containing the configuration data
</dd>
</dl>
<a NAME="RefactoringServer.__showFileHistory" ID="RefactoringServer.__showFileHistory"></a>
<h4>RefactoringServer.__showFileHistory</h4>
<b>__showFileHistory</b>(<i></i>)

<p>
        Private method to show the refactoring history of the current file.
</p>
<a NAME="RefactoringServer.__showProjectHistory" ID="RefactoringServer.__showProjectHistory"></a>
<h4>RefactoringServer.__showProjectHistory</h4>
<b>__showProjectHistory</b>(<i></i>)

<p>
        Private method to show the project refactoring history.
</p>
<a NAME="RefactoringServer.__showRefactoringHistoryMenu" ID="RefactoringServer.__showRefactoringHistoryMenu"></a>
<h4>RefactoringServer.__showRefactoringHistoryMenu</h4>
<b>__showRefactoringHistoryMenu</b>(<i></i>)

<p>
        Private slot called before the refactoring history menu is shown.
</p>
<a NAME="RefactoringServer.__showRopeHelp" ID="RefactoringServer.__showRopeHelp"></a>
<h4>RefactoringServer.__showRopeHelp</h4>
<b>__showRopeHelp</b>(<i></i>)

<p>
        Private slot to show help about the refactorings offered by Rope.
</p>
<a NAME="RefactoringServer.__soaFinished" ID="RefactoringServer.__soaFinished"></a>
<h4>RefactoringServer.__soaFinished</h4>
<b>__soaFinished</b>(<i>result</i>)

<p>
        Private method to handle the "Soa Finished" result sent by
        the client.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the result data
</dd>
</dl>
<a NAME="RefactoringServer.__startRefactoringClient" ID="RefactoringServer.__startRefactoringClient"></a>
<h4>RefactoringServer.__startRefactoringClient</h4>
<b>__startRefactoringClient</b>(<i>interpreter, clientEnv</i>)

<p>
        Private method to start the refactoring client.
</p>
<dl>

<dt><i>interpreter</i> (str)</dt>
<dd>
interpreter to be used for the refactoring client
</dd>
<dt><i>clientEnv</i> (dict)</dt>
<dd>
dictionary with environment variables to run the
            interpreter with
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating a successful client start
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="RefactoringServer.__transformModuleToPackage" ID="RefactoringServer.__transformModuleToPackage"></a>
<h4>RefactoringServer.__transformModuleToPackage</h4>
<b>__transformModuleToPackage</b>(<i></i>)

<p>
        Private slot to transform a module to a package.
</p>
<a NAME="RefactoringServer.__updateConfig" ID="RefactoringServer.__updateConfig"></a>
<h4>RefactoringServer.__updateConfig</h4>
<b>__updateConfig</b>(<i></i>)

<p>
        Private slot to update the configuration file.
</p>
<a NAME="RefactoringServer.__useFunction" ID="RefactoringServer.__useFunction"></a>
<h4>RefactoringServer.__useFunction</h4>
<b>__useFunction</b>(<i></i>)

<p>
        Private slot to use a function wherever possible.
</p>
<a NAME="RefactoringServer.activate" ID="RefactoringServer.activate"></a>
<h4>RefactoringServer.activate</h4>
<b>activate</b>(<i></i>)

<p>
        Public method to activate the refactoring server.
</p>
<p>
        This is performed when the rope plug-in is activated.
</p>
<a NAME="RefactoringServer.confirmAllBuffersSaved" ID="RefactoringServer.confirmAllBuffersSaved"></a>
<h4>RefactoringServer.confirmAllBuffersSaved</h4>
<b>confirmAllBuffersSaved</b>(<i></i>)

<p>
        Public method to check, if any editor has unsaved changes.
</p>
<dl>
<dt>Return:</dt>
<dd>
flag indicating, that no editor contains unsaved edits
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="RefactoringServer.confirmBufferIsSaved" ID="RefactoringServer.confirmBufferIsSaved"></a>
<h4>RefactoringServer.confirmBufferIsSaved</h4>
<b>confirmBufferIsSaved</b>(<i>editor</i>)

<p>
        Public method to check, if an editor has unsaved changes.
</p>
<dl>

<dt><i>editor</i> (Editor)</dt>
<dd>
reference to the editor to be checked
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating, that the editor doesn't contain
            unsaved edits
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="RefactoringServer.deactivate" ID="RefactoringServer.deactivate"></a>
<h4>RefactoringServer.deactivate</h4>
<b>deactivate</b>(<i></i>)

<p>
        Public method to deactivate the refactoring server.
</p>
<a NAME="RefactoringServer.getActions" ID="RefactoringServer.getActions"></a>
<h4>RefactoringServer.getActions</h4>
<b>getActions</b>(<i></i>)

<p>
        Public method to get a list of all actions.
</p>
<dl>
<dt>Return:</dt>
<dd>
list of all actions
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
list of EricAction
</dd>
</dl>
<a NAME="RefactoringServer.getMainWindow" ID="RefactoringServer.getMainWindow"></a>
<h4>RefactoringServer.getMainWindow</h4>
<b>getMainWindow</b>(<i></i>)

<p>
        Public method to get a reference to the IDE main window.
</p>
<dl>
<dt>Return:</dt>
<dd>
reference to the IDE main window
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
UserInterface
</dd>
</dl>
<a NAME="RefactoringServer.handleCall" ID="RefactoringServer.handleCall"></a>
<h4>RefactoringServer.handleCall</h4>
<b>handleCall</b>(<i>method, params</i>)

<p>
        Public method to handle a method call from the client.
</p>
<dl>

<dt><i>method</i> (str)</dt>
<dd>
requested method name
</dd>
<dt><i>params</i> (dict)</dt>
<dd>
dictionary with method specific parameters
</dd>
</dl>
<a NAME="RefactoringServer.handleNewConnection" ID="RefactoringServer.handleNewConnection"></a>
<h4>RefactoringServer.handleNewConnection</h4>
<b>handleNewConnection</b>(<i></i>)

<p>
        Public slot for new incoming connections from a client.
</p>
<a NAME="RefactoringServer.handleRopeError" ID="RefactoringServer.handleRopeError"></a>
<h4>RefactoringServer.handleRopeError</h4>
<b>handleRopeError</b>(<i>result</i>)

<p>
        Public method to handle a rope error.
</p>
<dl>

<dt><i>result</i> (dict)</dt>
<dd>
dictionary containing the error information
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating, that the error is to be ignored
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="RefactoringServer.projectClosed" ID="RefactoringServer.projectClosed"></a>
<h4>RefactoringServer.projectClosed</h4>
<b>projectClosed</b>(<i></i>)

<p>
        Public slot to handle the projectClosed signal.
</p>
<a NAME="RefactoringServer.projectOpened" ID="RefactoringServer.projectOpened"></a>
<h4>RefactoringServer.projectOpened</h4>
<b>projectOpened</b>(<i></i>)

<p>
        Public slot to handle the projectOpened signal.
</p>
<a NAME="RefactoringServer.refreshEditors" ID="RefactoringServer.refreshEditors"></a>
<h4>RefactoringServer.refreshEditors</h4>
<b>refreshEditors</b>(<i>changedFiles</i>)

<p>
        Public method to refresh modified editors.
</p>
<dl>

<dt><i>changedFiles</i> (list of str)</dt>
<dd>
list of changed files
</dd>
</dl>
<a NAME="RefactoringServer.reportChanged" ID="RefactoringServer.reportChanged"></a>
<h4>RefactoringServer.reportChanged</h4>
<b>reportChanged</b>(<i>filename, oldSource</i>)

<p>
        Public slot to report some changed sources.
</p>
<dl>

<dt><i>filename</i> (str)</dt>
<dd>
file name of the changed source
</dd>
<dt><i>oldSource</i> (str)</dt>
<dd>
source code before the change
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial