Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EDT:Compiler Settings Introduction
In EDT 0.7, the EDT Compiler contains two generators: one for Java and one for JavaScript. The Java generator is used for generating EGL code to Java. Generally, the EGL files configured with Java generator are EGL services and programs. Interfaces, libraries, and records used in services and programs also need to be configured with the Java generator. On the other hand, the Rich UI handlers are mostly configured with the JavaScript generator, because normally they will be generated to JavaScript running in a browser. It's possible that interfaces, libraries, and records would be also used in RUI handlers; if so, then those parts should be configured with the JavaScript generator as well. Otherwise, the generated JavaScript file of a RUIHandler cannot resolve references to the interfaces, libraries or records. If a type is referenced in both services and RUI handlers, then the referenced part should be configured with both Java and JavaScript generators
You can configure the compiler and generators for your EGL applications at a project or package level. The settings in the parent level will be inherited by the children unless they are not changed.
Contents
Compiler setting in the New EGL Project Wizard
In the EGL Project wizard (File > New > EGL Project), four types of project templates are available. The EGL project wizard provides compiler and generator defaults based on the project template selected. The Hello World project template is a sample which uses both the Java and JavaScript generators by default. The other templates allow you to specify the generators you want to use. In most cases you can follow the default settings created by the New EGL Project wizard, and you won't need to configure the settings manually if you follow the usage conventions for packages.
A project created using the Basic template uses both the Java and JavaScript generators. EGL source files in a basic project will be generated into both Java and JavaScript.
The Web 2.0 client application template has a single package named client configured with JavaScript generator by default. Only JavaScript will be generated for the EGL source files in this project.
A project created with the Web 2.0 client application with services template contains 3 packages; client, server, and common. The client package is configured with JavaScript generator. The server package is configured with the Java generator. The common package is configured with both the Java and JavaScript generators. You can put the EGL source files in different packages depending on the purpose of each file. For example, if a type is referenced in both the client and server packages, then the type should be put into the common package.
You can check Override generation settings from workspace preferences to override the settings for the project.
<insert image of compiler setting page>
Compiler settings in the Properties
You can view or edit the compiler and generator settings by right-clicking Projects or Packages > Properties > EGL Compiler. Also, you can specify whether the project or package is allowed to change the settings in this window. Please refer to the screen shot below to see the compiler settings for a package.
Set default compiler and generator setting for your workspace
You can set the default generator folder for the Java and JavaScript generators by clicking Windows > Preferences > EGL > Compiler > EDT. You can specify a different generator folder for the Java and JavaScript generators.
Extending EDT compiler and generators
EDT is designed for extensibility, which means that you can extend the EDT framework with your own compilers and generators.