Refactor Menu

This section lists the menu items in the Refactor menu. The items you see are dependent on the type of object (variable, function, etc.) you are refactoring. For more information, see C Code Refactoring.

For keyboard shortcuts of some of these menu items, see Help>Keyboard Shortcuts Card.

Table 1. Refactor Menu Options
Command Action
Rename Enables you to change the name of a variable or function to something more meaningful. 
In addition, it updates all source code in your project to reference the element by its new name.
Move Moves a class to another package or into another class
In addition, all source code in your project is updated to reference the class in its new location.
Copy Copies a class to the same or a different package.
Safely Delete Checks for references to a code element and then automatically deletes that element if no other code references it.
Change Function Parameter Changes the amount and name of parameters for the selected function.
Encapsulate Fields C++ Only: Click in a C++ source file to see this option.

Automatically generates a getter method and a setter method for a field and optionally updates all referencing code to access the field using the getter and setter methods.

See also:

http://wiki.netbeans.org/Refactoring