Setting JET compiler preferences

The compiler options that you specify apply to all JET projects in the workspace that do not have specific values configured in the properties of the project.

About this task

Note: To set preferences for a specific JET project, in the Project Explorer view, right-click a JET project; then click Properties. Click EMFT JET Compiler and click the item that you want to modify.

To specify compiler preferences for JET transformations:

Procedure

  1. Click Window > Preferences.
  2. In the Preferences window, click EMFT JET Transformations.
  3. To specify the folders in a file system that contain JET transformation projects, which are contained in JAR files, click the appropriate buttons beside the Additional locations for JET Transformations field. When you export a JET transformation, the export wizard searches for JET transformations in the locations that you specify in this field.
  4. To specify JET compiler options, click Compiler Options, and modify the following settings, if appropriate:
    • To specify the version of JET that you are using, click the appropriate button below Generate Method Conformance. Typically, you should select JET2 - void generate(JET2Context context, JET2Writer out). If you are authoring JET transformations, you should not select JET1 - String generate(Object argument); you might select this option if you are migrating from JET1 to JET2.
    • To specify the location of JET templates in a project, specify a folder name in the Templates directory field. When you run the Update Project command, the JET templates are generated in this folder. This option is only available when you select JET1 - String generate(Object argument) in the Generate Method Conformance section.
    • To specify file name extensions for JET templates, use the controls associated with the File extensions for templates field. By default, JET templates have .jet as a file name extension. You might specify multiple file name extensions if you are migrating Design Pattern Toolkit (DPTK) templates.
    • To specify which package in a JET transformation project contains the compiled JET templates and other compiled Java code that the JET transformation generates, specify a package name in the Package for generated Java classes field. You might change the package name if you want to access a class directly from Java source code.
  5. Click Apply.
  6. Click OK.

Feedback