JinnIde is the Jinni Prolog IDE Plugin for JEdit. From the Cassandra release onwards,
Jinni Prolog code development is supported by automated creation of Jinni Prolog rules. The
following explains how to create a Jinni Prolog rule automatically.
To generate a Jinni Prolog rule JinnIde offers a GUI dialogue that allows
creating a JinniDoc-based template. With
JinnIde this is a trivial and simple thing to accomplish:
- Create a new Jinni Prolog file by selecting File/New or pressing CTRL-N. Of course,
alternatively one may use an existing file.
- Open up the template viewer or pull down the templates menu and click on Create
rule
- The GUI dialogue comes up:

Let's take a look at the entries and explain them one by one.
Form Descriptions
A form description serves to illustrate the usage of
a rule. For instance, when a rule called aNewRule/2 is defined,
it may be called in one or two or more different ways. In a case of two variables
it may be that one call is with the first variable being a ground variable,
the other one is with the second variable being ground. Note that the image
button next to this text field serves to clear the current form descriptions.
Note: Please avoid spaces as this may bring the logic to erroneously bring
up an error message.
Constraints
Constraints indicate the type of the variables used in above form descriptions,
which is either ground, unground or unrestricted, the latter case
meaning that they may either be ground or not ground.
Rule Descriptions
A rule description describes the objective giving full details including
possible warnings and other sorts of detailed information
Note that all these entries can be modified any time later.
For the given example, the filled dialogue may look as shown here:
After pressing OK all these descriptions are written out to the buffer
created in step (1) or inserted at the cursor position of JEdit's
buffer
for the existing file. For above input the following output is
generated:

So one can see that, apart from the above developer's descriptions, JinnIde
also produces
- a JinniDoc header
- all entries are indented in a way so a proper collapsing works when
JEdit's folding in indent mode is activated, see the following screenshot

Internally all this is accomplished by applying the velocity template engine
which comes along with the templates plugin available for JEdit (which is thus
one of the required plugins for JinnIde). Take a look at
the documentation of the templates plugin for the details.