Generation in the workbench is accomplished with either the Generation
wizard or the Generate pop-up menu option.
When you select the menu option, EGL uses the default build descriptor.
If you want to override the default build descriptors that might be
set up, you can use the Generation wizard.
When you are working in the Eclipse workbench and want to generate
your EGL source code, there are several different ways you can choose
to start.
- You can use the Generate menu option by
right-clicking the name of the main part either in the EGL editor,
in the Outline view, or in the Project Explorer view. If you choose
this option, you should have a default build descriptor set. This
can be the default build descriptor at the project level that EGL
sets up for you when you create a new project, one of the other default
build descriptors set as a property within the directory chain, or
one of the default build descriptors you can set at the workbench
level as a preference. For more information, see “Default build descriptors.”
- You can use the Generate With Wizard menu
option by right-clicking the name of the main part in the Project
Explorer view or the Outline view.
- You can also enable the Auto generate function by going to the
EGL Generation preferences page. For background information, see “Overview
of Rich UI deployment.”
There are several steps involved in the generation process:
- First, select the parts that you want to generate. If you select
an EGL container such as a folder, package, or project, EGL will generate
output for each EGL main part in the container.
- Next, initiate the generation process.
- Finally, monitor your progress.
To make generation easier, first select a default build descriptor.
When you generate a VGWebTransaction program and
want to generate a VGUIRecord with a different set of options, set
the secondaryTargetBuildDescriptor build
descriptor option.
Generating using the Generation wizard
To
generate in the workbench using the Generation wizard, follow these
steps:
- Right-click the name of a project, folder, package, or file in
the Project Explorer. To select multiple resource names, hold down
the Ctrl key as you click.
- Select the Generate With Wizard option.
- The Parts page of the wizard displays a list
of parts that can be generated, based on the selection that you made
to start the generation process. Select at least one part from the
list in order to continue to the next page of the wizard. You can
select or deselect all the parts in the list using the buttons in
the interface.
- On the Build Descriptors page you can choose one of two modes
for assigning Build Descriptor parts:
- Use one set of build descriptors for all parts
- Use the Add button to select one or more
Build Descriptor parts to apply to all the parts you are generating.
- Select a set of build descriptors for each part
- First select one or more parts in the Parts column.
Use Ctrl-Click to select multiple parts. Then use the Add button
to select one or more Build Descriptor parts to apply to the specific
selected parts.
- On the Generation Options page of the wizard
you can set or override build descriptor options that can vary depending
on your circumstances. For example, you might want to set user IDs
and passwords on this page rather than in the build descriptor to
avoid keeping sensitive information in persistent storage. The build
descriptor options are in the following categories:
- General Options. With this group of build
descriptor options, you can set the target system, provide information
about remote build servers, and set a location for placement of generation
output.
- SQL Options. With this group of build descriptor
options, you can provide information that EGL uses to validate SQL
statements at generation time. If you generate Java™ code, some of this information is also
stored in Java runtime properties,
which are placed in a file for use at runtime.
- Java Options. With this group of build
descriptor options, you can specify information that is used only
when generating Java code.
- JavaScript Options. With this group of
build descriptor options, you can specify information that is used
only for Rich UI.
- COBOL Options. With this group of build
descriptor options, you can specify information that is used only
when generating COBOL code.
You might want to set user IDs and passwords on this page
rather than in the build descriptor to avoid keeping sensitive information
in persistent storage.
- On the Command File page of the wizard you can create a command
file. You can use a command file to generate an EGL program outside
of the workbench. You can reference the command file in the EGL Software
Development Kit (SDK) by using the command java EGLSDK.
To create a command file, do the following:
- Select the Create a command file check
box.
- Specify the name of the output file, either by typing the fully
qualified path or by clicking Browse and using
the standard Windows procedure
for selecting a file.
- Select or clear the Automatically insert EGL path (eglpath) check
box to specify whether you want to include the EGL project path in
the command file, as the initial value for eglpath; for details, see
“EGL command file.”
- Select a radio button to indicate whether to avoid generating
output when creating the command file.
- Once you have gone through all the pages, click Finish.
Generating using the menu option
To generate
in the workbench using the
Generate menu option,
follow these steps:
- Set a default build descriptor for each resource you are going
to generate. You can set a default build descriptor at the file, package,
folder, project, or workbench level.
- Select the name of a project, package, folder, or file in the
Project Explorer. To select multiple resource names, hold down the
Ctrl key as you click.
- Right-click, then select the Generate menu
option.
If you are generating a file, you can follow these steps:
- Double-click the file name in the Project Explorer view. The file
opens in the appropriate EGL editor.
- Right-click inside the editor pane, then select Generate.