Refactoring Commands

Index of All Documentation » Wing Pro Reference Manual » Command Reference »


Refactoring Commands

Not documented

add-import ()

Not documented

cleanup-imports ()

Start cleanup imports refactoring

delete-symbol (symbol=None, clicked=False, find_only_given_name=None)

Start delete symbol refactoring. Uses given symbol if not None, name clicked if clicked is true, or name at cursor in current editor.

If find_only_given_name is true, the symbol given is to be deleted; otherwise the class, function, or module referred to by the symbol is to be deleted. If find_only_given_name is None, it's set to true if the symbol is defined by an import and false otherwise.

extract-def (new_name=None)

Extract selected lines to a new function or method. The new_name argument is used as the default for the name field if specified. Key Bindings: Eclipse: Alt-Shift-M

introduce-variable (pos_range=None, new_name=None)

Introduce named variable set to the current selected expression or to the range in the active editor specified by pos_range. The new_name argument is used as the default variable name if it is specified. Key Bindings: Eclipse: Alt-Shift-L

move-symbol (symbol=None, new_filename=None, new_scope_name=None)

Move the currently selected symbol to another module, class, or function. The new_filename and new_scope_name arguments are used as default values in the filename and scope name fields if specified. Key Bindings: Eclipse: Alt-Shift-V

move-symbol-clicked ()

Move last symbol clicked to another module, class, or function.

refactoring-symbol-menu-items (clicked=False)

Internal command to generate items for refactoring menu

rename-module (new_name=None)

Rename module currently open in the editor. The new_filename argument is used as the default new filename if it is specified. Renaming packages is not supported

rename-symbol (fully_scoped=None, new_name=None, transform=None)

Rename currently selected symbol. The new_name argument is used as the default for the name field if specified. Aternatively, the transform argument may be set to camel-upper for UpperCamelCase, camel-lower for lowerCamelCase, under-lower for under_scored_name, or under-upper for UNDER_SCORED_NAME. Key Bindings: Eclipse: Alt-Shift-R; XCode: Command-Ctrl-E

rename-symbol-clicked (new_name=None, transform=None)

Rename last symbol clicked. See rename_symbol for details on arguments.