To rename source files and correct the references to those
files, you can use the refactoring function of the workbench.
To rename an EGL source file (.egl), from the
menu, select Refactor. For non-source files,
select Rename.
- Select the file to rename by using one of these methods:
- In the Project Explorer view, right-click the file
- For files that contain a generatable part, right-click the generatable
part in either the Outline, Parts List, or Parts Reference views
- For files that contain a generatable part, in the EGL editor,
place the cursor on the name of the generatable part and right-click
- From the pop-up menu, click . The Rename Part window
opens.
- In the Rename Part window, type a new name for the file; be sure
to follow EGL naming conventions.
- To see a list of the changes that EGL will make if you proceed,
click Preview.
- If you clear Update references, EGL will
not search other files for references to change. Select this check
box in most instances.
- Click OK.
When you rename a file, the following changes occur:
- EGL changes the name of the file to the new name
- For files that contain a generatable part, EGL changes the name
of the part to match the new file name
- For files that contain a generatable part, EGL searches the build
path for references to that part and changes the references to match
the new name of the part. For example, if you rename a file that contains
a called program, EGL changes the code that calls that program to
use the new name.