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

The ``Introduce Variable`` operation adds a variable that is initialized to the value of
an existing expression and then replaces all occurrences of that expression with the new
variable. To start an introduce variable operation, select an expression in the editor and
choose ``Introduce Variable`` from the ``Refactor`` menu or from the ``Refactor`` sub-menu
of the editor's right-click context menu. Wing will find all places the expression is used
in the current scope and list them in the `Refactoring
<script:show-panel-refactoring>`__ tool. To complete the operation,
enter the name for the new variable and press ``Enter`` or click on the ``Introduce
Variable`` button. 

The introduced variable name may include a dot. For example, a name starting with
``self.`` may be used to introduce an instance attribute in a method.

Note that each found match for the expression is displayed with a check box that
can be deselected to omit that match from the introduce variable operation. 

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