Skip to content

Commit 2df9976

Browse files
author
Bob Garner
committed
Updated documentation based on new install instruction functionality.
1 parent 233a761 commit 2df9976

24 files changed

+40
-19
lines changed

docs/GettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: GettingStarted)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: GettingStarted.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Getting Started

docs/Transforms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: Transforms)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: Transforms.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Transforms

docs/edl/EDL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Entity Definition Language

docs/edl/EDL_Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Configuration)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Configuration.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Configuration

docs/edl/EDL_Domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Domain)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Domain.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Domain

docs/edl/EDL_Entity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Entity)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Entity.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Entity

docs/edl/EDL_Interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Interface)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Interface.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Interfaces

docs/edl/EDL_Space.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Space)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EDL_Space.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Space

docs/emc/EMC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EMC)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: EMC.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Entity Model Classes

docs/etl/ETL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: ETL)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: ETL.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Entity Transform Language

docs/etl/ETL_Instructions.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
2-
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: ETL_Instructions)
2+
[//]: # (DO NOT EDIT THIS DOCUMENT, IT WAS GENERATED BY FILE: ETL_Instructions.md)
33
[//]: # (!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
44

55
# Template Instruction Reference
@@ -331,6 +331,7 @@ Instructions that perform some type of file operation.
331331

332332
| Instruction | Summary |
333333
|-------------|---------|
334+
| [`assert`](#instruction_assert) | Tests the provided condition expression and if fails will print the provided message. If the *level* is not specified or is `fatal` the compiler will exit. |
334335
| [`file`](#instruction_file) | Allows you to direct the template output to a file. |
335336
| [`import`](#instruction_import) | Imports a file into the template engine and executes it. |
336337
| [`install`](#instruction_install) | Provides an easy way to install files into your local project. |
@@ -340,6 +341,28 @@ Instructions that perform some type of file operation.
340341

341342
<hr/>
342343

344+
<a name="instruction_assert"></a>
345+
### `assert`
346+
347+
This is similar to a `$[log fatal]` but with some advantages. Firstly, it is more compact since it basically includes a surrounding `if` block. Secondly, you have the ability to assert to a non-fatal level but still have that exit (such as when you are debugging). Thirdly, you can perform multiple asserts at an `error` level followed by a final `fatal` assert that will fire if any error` asserts occurred previously - thus allowing you to find and report possibly multiple issues before exiting.
348+
349+
#### Usage
350+
351+
> `$[assert `*condition* *level*`]` ...***template-block***... `$[/assert]`
352+
353+
#### Arguments
354+
355+
| Argument | Type | Description |
356+
|----------|------|-------------|
357+
| *condition* | `FTExpression` | The assert executes when this condition evaluates to **false**. The condition can involve one of the special assert global variables (e.g., `__assert_error`, `__assert_warning`, ...) to gather up many asserts into a fatal assert. For instance, `$[assert !__assert_error fatal]Cannot proceed.$[/assert]` |
358+
| *level* | `String` | The level can be used to classify the level of severity of the log output. The options are `info`, `debug`, `warning`, `error` and `fatal`. For the first three the only difference in the output is the prefix of each line which is the level name in all caps followed by `> `. For `error`, output is directed to system error. For `fatal`, output is also sent to system error but after the output, the compiler terminates, stopping any further execution of the template. |
359+
360+
#### *template-block*
361+
362+
If the assert condition is **not** met, the contents of this assert block is sent to the log as the level provided.
363+
364+
<hr/>
365+
343366
<a name="instruction_file"></a>
344367
### `file`
345368

@@ -385,7 +408,7 @@ You can import template files that simply contain function declarations so that
385408
<a name="instruction_install"></a>
386409
### `install`
387410

388-
When setting up a project using files from a library, this instruction makes it easy to install files from that library into the project directory structure. The files being installed have their native file extension (not the one we use for templates) so they are easily viewable and edited (using the code highlighter appropriate for them). You can also include template code in them and the template code will execute during the install process. Of course, the presence of the template code may interfere with the code highlighter and as well, the template code will not be appropriately highlighted but when the amount of template code is relatively small it can be very advantageous to use this install method over just making it a template and running the template.
411+
When setting up a project using files from a library, this instruction makes it easy to install files from that library into the project directory structure. The files being installed have their native file extension but ultimately end with the .eml extension. You can include template code in them and the template code will execute during the install process. Using this `install` instruction instead of the `import` has the advantage that you do not need to include a `file` instruction to create the output file, the template being installed is the file (after of course being transformed by its template code).
389412

390413
#### Usage
391414

File renamed without changes.
File renamed without changes.
File renamed without changes.

src/main/java/org/entityc/compiler/transform/template/tree/FTInstall.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,11 @@
3939
summary = "Provides an easy way to install files into your local project.",
4040
description = "When setting up a project using files from a library, this instruction makes it easy "
4141
+ "to install files from that library into the project directory structure. The files being installed "
42-
+ "have their native file extension (not the one we use for templates) so they are easily "
43-
+ "viewable and edited (using the code highlighter appropriate for them). You can also include "
44-
+ "template code in them and the template code will execute during the install process. "
45-
+ "Of course, the presence of the template code may interfere with the code highlighter and "
46-
+ "as well, the template code will not be appropriately highlighted but when the amount of "
47-
+ "template code is relatively small it can be very advantageous to use this install method over "
48-
+ "just making it a template and running the template.")
42+
+ "have their native file extension but ultimately end with the .eml extension. You can include "
43+
+ "template code in them and the template code will execute during the install process. Using "
44+
+ "this `install` instruction instead of the `import` has the advantage that you do not need to "
45+
+ "include a `file` instruction to create the output file, the template being installed is the file "
46+
+ "(after of course being transformed by its template code). ")
4947
public class FTInstall extends FTNode {
5048

5149
private final FTExpression sourceExpression;

0 commit comments

Comments
 (0)