eric4.Refactoring.Refactoring

Module implementing the refactoring interface to brm.

Classes

Refactoring Class implementing the refactoring interface to brm.
SilentLogger Class implementing a logger that doesn't log anything.

Functions

None


Refactoring

Class implementing the refactoring interface to brm.

Derived from

QObject

Methods

Refactoring Constructor
__confirmAllBuffersSaved Private method to check, if any editor has unsaved changes.
__confirmBufferIsSaved Private method to check, if an editor has unsaved changes.
__extractLocalVariable Private slot to handle the Extract Local Variable action.
__extractMethod Private slot to handle the Extract Method action.
__initialize Private slot to handle the Reset action.
__inlineLocalVariable Private slot to handle the Inline Local Variable action.
__moveClass Private slot to handle the Move Class action.
__moveFunction Private slot to handle the Move Function action.
__refreshEditors Private method to refresh modified editors.
__rename Private slot to handle the Rename action.
__renameMethodPromptCallback Private slot called by the refactoring machine to ask the user for confirmation.
__reset Private slot to handle the Reset action.
__showOutput Private method to switch to the relevant output tab.
__undo Private slot to handle the Undo action.
__unhandledException Private method handling not specifically handled exceptions.
getActions Public method to get a list of all actions.
handlePreferencesChanged Public slot called when the preferences have been changed.
handleProjectClosed Public slot to handle the projectClosed signal.
handleProjectOpened Public slot to handle the projectOpened signal.
initActions Public method to define the refactoring actions.
initMenu Public slot to initialize the refactoring menu.
queryDefinition Public slot to handle the Query Definition action
queryReferences Public slot to handle the Query References action.

Refactoring (Constructor)

Refactoring(parent = None)

Constructor

parent
parent (QObject)

Refactoring.__confirmAllBuffersSaved

__confirmAllBuffersSaved()

Private method to check, if any editor has unsaved changes.

Refactoring.__confirmBufferIsSaved

__confirmBufferIsSaved(editor)

Private method to check, if an editor has unsaved changes.

editor
Reference to the editor to be checked.

Refactoring.__extractLocalVariable

__extractLocalVariable()

Private slot to handle the Extract Local Variable action.

Refactoring.__extractMethod

__extractMethod()

Private slot to handle the Extract Method action.

Refactoring.__initialize

__initialize()

Private slot to handle the Reset action.

Refactoring.__inlineLocalVariable

__inlineLocalVariable()

Private slot to handle the Inline Local Variable action.

Refactoring.__moveClass

__moveClass()

Private slot to handle the Move Class action.

Refactoring.__moveFunction

__moveFunction()

Private slot to handle the Move Function action.

Refactoring.__refreshEditors

__refreshEditors(savedfiles, filename, line)

Private method to refresh modified editors.

savedfiles
list of filenames of modified files (list of strings)
filename
filename of the active editor (string)
line
line to place cursor at (int)

Refactoring.__rename

__rename()

Private slot to handle the Rename action.

Refactoring.__renameMethodPromptCallback

__renameMethodPromptCallback(filename, line, start, stop)

Private slot called by the refactoring machine to ask the user for confirmation.

filename
the name of the file (string)
line
the line of the object (int)
start
beginning column of the object (int)
stop
end column of the object (int)
Returns:
flag indicating renaming wanted (boolean)

Refactoring.__reset

__reset()

Private slot to handle the Reset action.

Refactoring.__showOutput

__showOutput()

Private method to switch to the relevant output tab.

Refactoring.__undo

__undo()

Private slot to handle the Undo action.

Refactoring.__unhandledException

__unhandledException(msg)

Private method handling not specifically handled exceptions.

msg
message describing the exception (string)

Refactoring.getActions

getActions()

Public method to get a list of all actions.

Returns:
list of all actions (list of E4Action)

Refactoring.handlePreferencesChanged

handlePreferencesChanged()

Public slot called when the preferences have been changed.

Refactoring.handleProjectClosed

handleProjectClosed()

Public slot to handle the projectClosed signal.

Refactoring.handleProjectOpened

handleProjectOpened()

Public slot to handle the projectOpened signal.

Refactoring.initActions

initActions()

Public method to define the refactoring actions.

Refactoring.initMenu

initMenu()

Public slot to initialize the refactoring menu.

Returns:
the menu generated (QMenu)

Refactoring.queryDefinition

queryDefinition()

Public slot to handle the Query Definition action

Refactoring.queryReferences

queryReferences()

Public slot to handle the Query References action.

Up


SilentLogger

Class implementing a logger that doesn't log anything.

Derived from

object

Methods

write Public method to write the arguments.

SilentLogger.write

write()

Public method to write the arguments.

Up