You can use the refactoring function of the workbench to
move parts between source files and correct references to those parts.
- In one of the following places, select the part that you want
to move:
- 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 containing the part in the
Project Explorer view
- In the popup menu, click . The Textual Move window
opens.
- In the Textual Move window, select a new source file for the part.
You can click Create EGL file to create a new
file to put the part into. If you are moving a main part, the target
source file must have the same name as the part.
- You can click Preview for a list of the
changes that EGL will make if you proceed.
- If you clear the Update references to the moved elements check
box, EGL will not search other files for references to change. Generally,
select this check box.
- Click OK.
Moving a part makes the following changes:
- EGL moves the part into the target source file
- EGL searches the build path for references to that part and changes
the references to match the new location of the part. For example,
if you move a record part, EGL changes variable declarations and any import statement
to the new location of the record
- For JSF Handlers, EGL links the JSP file to the new part's file,
but it does not change the name of the JSP file.
- For JSF Handlers, EGL updates references to the part's file in
the faces configuration file.
- For Program parts within an EGL plug-in project, EGL also corrects
the reference to the program in the plugin.xml file.