Renaming a source file

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

With refactoring, you can rename EGL source files or JSP files that are controlled by a JSF Handler.

  1. In one of the following places, select the file you want to rename:
    • Right-click the file in the Project Explorer view
    • For files that contain a main part, right-click the main part in the Outline view, Parts List view, or Parts Reference view
    • For files that contain a main part, place the cursor on the part name in the EGL editor and right-click
  2. From the pop-up menu, click Refactor > Rename. The Rename Part window opens.
  3. In the Rename Part window, type a new name for the file, following EGL naming conventions.
  4. You can click Preview for a list of the changes 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. In most instances, select this check box.
  6. Click OK.
Renaming a file makes the following changes:
You might still need to check for other changes caused by refactoring. For example, EGL does not change labels used with the forward statement. Suppose that you have a line of code that passes control to a JSF Handler like this:
forward to "myWebPage";
In this case, if you renamed myWebPage, EGL does not change this forward statement to reflect the new label for the page. You must search for changes and update the files manually.

Feedback