Renaming parts

You can use the refactoring function of the workbench to rename parts and correct references to those parts.

  1. In one of the following places, select the part that you want to rename:
    • Place the cursor on the part name in the EGL editor and right-click.
    • Right-click the part in the Outline view, Parts List view, or Parts Reference view.
    • For main parts, right-click the file that contains the part in the Project Explorer view
  2. In the popup menu, click Refactor > Rename. The Rename window opens.
  3. In the Rename window, type a new name for the part, following EGL naming conventions.
  4. You can click Preview for a list of the changes that EGL will make if you proceed.
  5. If you clear the Update references check box, EGL will not search other files for references to change. Generally, select this check box.
  6. Click OK.
Renaming a part makes the following changes happen:
  • EGL changes the name of the part to the new name
  • 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 record part, EGL changes variable declarations to the new name of the record
  • For main parts, EGL changes the name of the file to match the new part name
  • For Program parts within an EGL plug-in project, EGL also corrects the reference to the program in the plugin.xml file.

You cannot rename functions in this way.