You can create your own project templates to use in the IDE to create applications.
A custom template is actually an existing project so, first, you need to create and configure a project that includes required source files and settings. You can store the project in a dedicated templates folder on your machine (or a folder in your source control system). Once you have created your custom template, you need to configure your IDE to search for templates in your templates folder.
Note: A project template can only be used to produce projects of the same project type.
To create a project to use as a custom template:
- In the IDE, create a project of the desired project type.
- Add existing files to the project or add new ones to it, and add the required source code to them.
- Configure the project and the file properties.
- Build the project and ensure there are no build errors.
The project is stored in a subfolder of the current workspace. This subfolder includes the source programs and the build output, the
.project file and some other files with information about the project and the build and debug configurations.
To save the project in a templates folder:
- On your file system, navigate to the project folder in your workspace.
- If you do not want to distribute the build output files (such as .gnt, .dll, exe) as part of the template, either delete the output folder or the individual files.
- Copy and paste the project folder into your templates folder (such as
c:\myprojecttemplates).
Instead of saving the project in the templates folder in this way, you could export it from the IDE as follows:
- In the IDE, select your project in the COBOL or PL/I
Explorer.
- Click
File > Export.
- In the
Export dialog box, expand
General, click
File System, then click
Next.
- Ensure the check box for your project is enabled in the left-hand pane.
- In the right-hand pane, ensure you have selected only the source files and not the output files.
- In the
To directory field, specify the path to your dedicated templates folder (c:\myprojecttemplates).
- Click
Finish.
This stored the project file and the selected source files in your templates folder.
Note: It is a good practice to use a single folder to store all of your templates. You can use any subfolder structure within that location. When you want to use the templates, you need to configure the IDE preferences to search for templates in the templates folder. The IDE will scan all subfolders of the templates folder, and will display the relevant project and file types in a tree structure.