# eric3.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
__unhandledException | Private method handling not specifically handled exceptions.
confirmAllBuffersSaved | Private method to check, if any editor has unsaved changes.
confirmBufferIsSaved | Private method to check, if an editor has unsaved changes.
getActions | Public method to get a list of all actions.
handleExtractLocalVariable | Private slot to handle the Extract Local Variable action.
handleExtractMethod | Private slot to handle the Extract Method action.
handleInlineLocalVariable | Private slot to handle the Inline Local Variable action.
handleMoveClass | Private slot to handle the Move Class action.
handleMoveFunction | Private slot to handle the Move Function action.
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.
handleQueryDefinition | Private slot to handle the Query Definition action
handleQueryReferences | Private slot to handle the Query References action.
handleRename | Private slot to handle the Rename action.
handleReset | Private slot to handle the Reset action.
handleUndo | Private slot to handle the Undo action.
init | Private slot to handle the Reset action.
initActions | Public method to define the refactoring actions.
initMenu | Public slot to initialize the refactoring menu.
refreshEditors | Private method to refresh modified editors.
renameMethodPromptCallback | Private slot called by the refactoring machine to ask the user for confirmation.
setMenuItemsEnabled | Private method to enable/disable menu items.
showOutput | Private method to switch to the relevant output tab.

### Refactoring (Constructor)

Refactoring(parent = None, *args)

Constructor

parent
  parent (QObject)
*args
  arguments passed on to QObject

### Refactoring.__unhandledException

__unhandledException(msg)

Private method handling not specifically handled exceptions.

msg
  message describing the exception (string)

### 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.getActions

getActions()

Public method to get a list of all actions.

Returns:
  list of all actions (list of E3Action)

### Refactoring.handleExtractLocalVariable

handleExtractLocalVariable()

Private slot to handle the Extract Local Variable action.

### Refactoring.handleExtractMethod

handleExtractMethod()

Private slot to handle the Extract Method action.

### Refactoring.handleInlineLocalVariable

handleInlineLocalVariable()

Private slot to handle the Inline Local Variable action.

### Refactoring.handleMoveClass

handleMoveClass()

Private slot to handle the Move Class action.

### Refactoring.handleMoveFunction

handleMoveFunction()

Private slot to handle the Move Function action.

### 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.handleQueryDefinition

handleQueryDefinition()

Private slot to handle the Query Definition action

### Refactoring.handleQueryReferences

handleQueryReferences()

Private slot to handle the Query References action.

### Refactoring.handleRename

handleRename()

Private slot to handle the Rename action.

### Refactoring.handleReset

handleReset()

Private slot to handle the Reset action.

### Refactoring.handleUndo

handleUndo()

Private slot to handle the Undo action.

### Refactoring.init

init()

Private slot to handle the Reset action.

### Refactoring.initActions

initActions()

Public method to define the refactoring actions.

### Refactoring.initMenu

initMenu()

Public slot to initialize the refactoring menu.

Returns:
  the menu generated (QPopupMenu)

### 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.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.setMenuItemsEnabled

setMenuItemsEnabled(enabled)

Private method to enable/disable menu items.

enabled
  Flag indicating enabled or disabled status. (boolean)

### Refactoring.showOutput

showOutput()

Private method to switch to the relevant output tab.

Up

## SilentLogger

Class implementing a logger that doesn't log anything.

### Derived from

None

### Methods

write | Public method to write the arguments.

### SilentLogger.write

write()

Public method to write the arguments.

Up