Contents of an EGL application

EGL applications contain projects, packages, folders, and files.

Projects

An EGL application contains one or more projects to hold and organize your code in folders and files. A project is contained in a single physical folder in your workspace, and that folder contains other folders, as described below.

You can have as many projects as you want, and those projects can be independent or they can reference each other and use parts from each other's packages. The needs of your organization and design of the application that you are creating determines your use of projects, packages, and files. There are no set guidelines for how to use them. For information on references between projects, see The EGL build path.

In practice, EGL architects tend to divide an application according to one or more of the following criteria:
  • Business problems to be solved
  • Technology types to be used
  • Development groups who do the coding
  • Archival methods to be used to store the source code and maintain source control
  • Optimum program size
  • Testing strategies

Packages

A package is an arbitrary category that you can use to organize EGL source files. Packages also represent specific folders in your EGL workspace, and are created beneath projects, in EGL source folders. You can use the name of a package as a qualifier to bring a part or variable into your current scope (see Scope).

Folders

An EGL project can contain several folders. Some of these folders have default names; for example, the EGL source files go in a folder named EGLSource by default. The documentation often refers to these folders by their default name, but be aware that they might have different names in your project.

Source code folder

EGL projects have at least one source code folder, named EGLSource by default. The source folder contains all of the EGL source files, build files, and deployment descriptor files for the project. EGL generates output code only for files within a source code folder.

You can create packages within source folders or additional source code folders to organize your files. See Creating an EGL package or Creating source folders.

Generated code folder
When you generate to Java™, the EGL project has a folder to hold the files that are created by the generation process. By default, the generated code folder is named src, but in most cases (such as in the Project Explorer view), it is labeled Java Resources, regardless of the actual folder name on disk. Do not edit the files in the generated code folder, because they are overwritten each time you generate the project.

For COBOL output, EGL puts the generated code into a directory outside the workspace as specified by the genDirectory build descriptor option. EGL then transfers the outputs to the target system based on the destHost and other related build descriptor options.

EGLBin folder
The EGLBin folder is used to store internal representation files, which are used by EGL in the generation and debugging processes.
Web content folder
For EGL Rich UI and web projects, the web content folder contains the Web pages, style sheet files, and other files that control how the web project will display in a browser. By default, the web content folder is named WebContent.

For information on Rich UI technology, see Overview of EGL Rich UI. For information on the files used in web projects that support JavaServer Faces (JSF), see Elements of a JSF web application.

Packages
Packages are contained within source folders and group source files.
META-INF folder
For EGL plug-in projects, the META-INF folder contains the MANIFEST.MF file.

Files

The two major types of EGL files are source files, files that contain EGL parts such as programs, libraries, and records, and build files, files that contain EGL build parts such as build descriptors. Generally, you will not have to spend much time working with other types of files. The following is a list of the files that are most commonly found in an EGL project:

Source files
Source files contain EGL logic parts and data parts, such as programs and records. Source files always end in the extension .egl.
Build files
Build files contain EGL build parts, such as build descriptors. These files have the extension .eglbld.
Deployment descriptors
EGL deployment descriptors, not to be confused with J2EE deployment descriptors, contain information about deployment. These files have the extension .egldd.
Web pages
EGL Rich UI projects include JavaScript files that are served from an application server but run in a browser. You place the JavaScript into an HTML file at EGL deployment time, as noted in Overview of EGL Rich UI deployment.

EGL web projects that support JavaServer Faces include JSF files that run on an application server.

Internal representation files
Internal representation (IR) files are an intermediate step between EGL source and generated source; they are used in generation and debugging. These files have the extension .ir and are found in the EGLBin folder. Generally, you can ignore these files, because EGL usually creates them automatically from your source code and build files when the project is built.

For additional details on the use of IR files and on the process of creating EGL-generated output, see Introduction to EGL generation and deployment.

.
.eglpath
The EGL build path file is named .eglpath and is stored in the root of the project. This file lists the locations that are searched for any part that is not found in the current project, including the source folders in the current project and all other projects on the build path of the current project.
In the following example of an .eglpath file, EGLSource is a source folder in the current project, and AnotherProject is a project in the EGL build path:
  <?xml version="1.0" encoding="UTF-8"?>
  <eglpath>
    <eglpathentry kind="src" path="EGLSource"/>
    <eglpathentry kind="src" path="\AnotherProject"/>
  </eglpath>

The source folders for AnotherProject are determined by the .eglpath file in that project.

For more information, see The EGL build path.

.eglproject
This file contains basic information about the EGL project, such as where its default build descriptors are located.
faces-config.xml
For EGL web projects, EGL uses the JSF configuration file to determine how to navigate from page to page. See Elements of a JSF web application for information on the JSF configuration file and for other files related to EGL web projects.
Transformation parameter files
When creating EGL code from a UML model, you create a .TPM file that specifies options for the transformation. See Generating source code from UML models.
Other files
Your project might contain any number of other files that are not directly related to EGL. For information about those types of files, use the search function of the help system.

Files that apply only to EGL plug-in projects

EGL plug-in projects contain several files that are not EGL files. These files are part of the standard definition of an Eclipse plug-in, or the smallest independent unit of functionality in the Eclipse workbench. The workbench itself is composed largely of a collection of plug-ins. You can extend the workbench by adding additional plug-ins, either from a commercial product, an open-source project, or plug-ins you create yourself. When you create an EGL plug-in project, EGL adds the files that are necessary for the project to function as a plug-in. EGL also adds the files that are necessary to define a run-time configuration of the workbench.

plugin.xml
The plugin.xml file describes the extensions that your project adds to the Eclipse framework. More specifically, this file contains an entry that controls the runtime operations of Console UI applications that are running in rich client platform (RCP) mode. Also, when you generate a project, EGL adds a reference in the plugin.xml file for each Console UI program in the project. EGL uses this reference when running a Console UI program in RCP mode. You rarely need to edit the reference. The plugin.xml file is created when you generate a program within an EGL plug-in project.
MANIFEST.MF
The MANIFEST.MF file describes the requirements for a program to run as an RCP application. This file is tied closely to the plugin.xml file.
Product file
EGL plug-in projects contain a file named projectName.product, where projectName is the name of the project. This file defines an Eclipse product, which in this context refers to the launch configuration for a stand-alone instance of the workbench. This file defines the plug-ins that are included in the workbench when running a program as an RCP application.
config.ini
For EGL plug-in projects, this file sets the value of system variables that the launch configuration requires.
build.properties
This file specifies which files from the project the plug-in uses in the workbench at run time.

The EGLbin directory

The EGLbin directory contains system files that EGL uses for the builder, generator, and debugger. You can safely ignore the files in this directory. Do not commit the EGLbin directory to a source code repository, as this directory is recreated each time you check the project out of the repository.


Feedback