<type>documentation</type>
<domain>versioncontrol</domain>
<id>versioncontrol</id>
<title>Extract Function / Method</title>
<date>$Date: 2006-05-24 22:53:07 -0400 (Wed, 24 May 2006) $</date>
<version>$Revision: 13098 $</version>
<product>pro+</product>

The ``Extract Function / Method`` operation creates a new function or method
from the currently selected lines.  It replaces the lines with a call to
the new function or method, passing in needed arguments and returning 
any values needed in the calling block of code.

To start an extract operation, select the lines to be extracted in the editor
and then select ``Extract Function/Method`` from the ``Refactor`` menu or from the
``Refactor`` sub-menu of the editor's right-click context menu. Wing will
then display the `Refactoring
<script:show-panel-refactoring>`__ tool. To complete the operation, enter the
name for the new function or method, select the scope in which to define it,
and press ``Enter`` or click on the ``Extract`` button.

After it completes, the extract operation can be undone with the ``Revert``
button in the ``Refactoring`` tool.

Note that the extract operation currently cannot extract lines that contain
return statements before the final line.
