The Template Tree Window

sTemplate Tree

Templates

The function templates define the structure of the functions and are used to build functions. Function templatesdon't belong to projects, but to the machine: every machine that runs a Matrex desktop or, from version 2.0, a Matrex server application has a set of templates. Even if it should be seldom needed, you can add or change function templates (also remove them). You can build your own library of templates and, if you like, share it with others. Templates are composed by:

The locations (directories and jar files) for templates definitions, code and script languages can be defined using the files locations dialog.

The template tree window contains:

As with the other trees, if you know at least a part of the name-package of the template, just write it on the search bar on the top of the templates tree and either press�enter or click on the green arrow button. The first template matching the text in the search bar gets visualized and selected. Pressing again enter or clicking on the green arrow button selects the next matching template, and so on.

The tree's popup menu

Clicking with the right mouse button on an item in the Function templates tree, a popup menu appears. With it you can:

Add a template

The menu item New template opens the template editor, used to add templates.

Edit a template

Edit the selected item with the Edit Template menu. The template editor opens, with the entered input and output matrices definitions and parameter definitions in place. You can change them and save the template again.

Remove a template

Remove the selected item with the Remove Template menu.
This is a very risky operation, because there can be functions in some projects that are built on that template and will not work again when the template is removed. Therefore it is requested to confirm.

Rename a template

Rename the selected item with the Rename Template menu. This is a very risky operation, because there can be functions in some projects that are built on that template and will not work again when the template changes its name. Therefore a confirmation is requested.
After you confirmed the choice, you can rename the template using the name-package dialog. The template is renamed, both in the template tree view and as file.

There is no view menu, because it does not make sense (at least in version 1.x) to view a template.

The template tree top menu


Menu Template

The menu on the top of the template tree has the expand and collapse choices like the other trees, but it has two more choices:

Search a template

You can do a full text search on the templates descriptions. In the top menu select the Search menu and search the template with the template search dialog that appears.

Build an HTML page listing all templates

In the top menu select the Build HTML Page menu.
This will save an HTML page with all the templates, their description, matrices and parameter definitions in the file that you choose.