The Files Locations Dialog
Matrex is distributed with a set of function templates to work with common problems. You
can add more templates if you need them, downloading one of the add-ons from
the Matrex download site and installing it.
To be able to install correctly new templates it is important to
understand what exactly is a template. A template is composed by:
- the template definition which contains a description of the template
and defines its input and output parameters. Each definition is saved in
a file, called template definition file. These files are
stored in directories.
- the template code, that contains the code to execute
the template function. The code can be in form of either:
- one or more Java classes (as the rest of Matrex).
The classes are stored in directories or as jar files.
- a script (e.g.
Jython, JRuby, Groovy...). Scripts are stored in directories.
The templates that come with the Matrex distribution are contained in the
root directory of Matrex. There are anyway reasons to have additional
directories for this files:
One way to do it is to add the additional template files, classes and
scripts to the root directory of Matrex, as it was happening with previous
versions of Matrex.
The problems with this are:
- You need to change the content of the root directory of Matrex. This is
not a good practice and in general the operating system does not allow it
for safety reason.
- Mixing original and additional templates in the same directories can
generate confusion.
The Files Location Dialog Matrex solves this problem by
allowing to define additional directories for templates definition files,
templates code in form of java classes and scripts.
The dialog contains 3 panels:
- Templates code (formerly named Plugins) is used to
select the directories and jar files containing the templates' java
classes, excluding the jar files coming with the Matrex distributions. If
these classes have some dependencies (jars or directories), they can be
added here.
This panel edits the content of the plugins.cld
configuration file.
- Templates definitions is used to select the
directories containing the templates definitions files,
included the ones coming with the Matrex distribution. This panel edits
the content of the templates.cld configuration file.
- Scripts is used to select the directories containing
the scripts used as code of the script based templates.
This panel edits the content of the scripts.cld
configuration file.
To add a jar file press the Add
Jar button. It opens a standard Open
File dialog that allows you to select the jar file to add.
To add a directory press the Add
Directory button. It opens a standard Open Directory dialog that allows you to
select the directory to add.
Selecting one or more rows� (directories or jar files) and pressing the Remove button, the rows are removed from
the file.
The changes are not commited to the configuration files until you press the
Save button, which also closes the
dialog.
To close the dialog without saving the changes in the plugins.ld file, press
the Cancel button