Product Information > JADE Development Environment User’s Guide > Chapter 4 - Defining Methods, Properties, Constants, and Conditions > Displaying Unused Local Variables and Parameters

Displaying Unused Local Variables and Parameters

The Methods menu of the Class Browser or Primitive Types Browser enables you to audit the local variables in the current method and display those that are unused.

To audit local variables in the method selected in the Methods List

  1. Select the Unused Local Variables command from the Methods menu. The first unused local variable in the method is then highlighted and the Find Unused Variables dialog is displayed, asking if you want to search for the next unused local variable in the method.

  2. Click the Yes button if you want to view the next unused local variable. Alternatively, click the No button if you want to remove the highlighted local variable from the method and then recompile the method (by pressing F8).

The dialog informs you when there are no more unused local variables in the current method. Click the OK button to return focus to your method. The Schema menu in the Schema Browser enables you to audit the local variables that are unused in all methods in a schema or class.

To audit local variables and parameters in all methods or a class of the schema selected in the Schema Browser

  1. Select the Find Unused Local Variables/Parameters command from the Schema menu. The Find Unused Local Variables and Parameters dialog, shown in the following diagram, is then displayed.

  2. If you do not want to search for unused local variables and parameters in all methods in all schemas (the default value), perform one of the following actions in the Search Criteria group box.

  3. In the Reporting Options group box:

  4. Click the Search button to initiate the search. Alternatively, click the Cancel button to abandon your selections.

The result of your search is output to a report that is displayed in print preview mode. This report contains the: