Telosys doc
WebsiteTwitterLinkedInNews
  • Telosys documentation
  • Telosys CLI
    • Installation on Linux
    • Installation on Windows
    • CLI configuration
    • CLI commands
    • Getting started
  • Telosys with VSCode
    • Extension installation
    • VSCode settings
    • Telosys terminal in VSCode
    • Telosys editor configuration
  • Telosys with JetBrains IDE
  • Project configuration
  • Project variables
  • Project databases
  • Models and entities
    • Model structure
    • Entity
    • Attribute / Link
    • Annotations
    • Tags
    • Examples
    • Model creation
    • Model installation
    • Models management
  • Bundles of templates
    • Bundle structure
    • Bundle creation
    • Bundles installation
    • Bundles management
    • Velocity language
    • Velocity directives
    • Velocity object types
    • Telosys directives
    • Telosys variables
    • Telosys objects
    • Code snippets
  • Code generation
    • "gen" command
    • "genb" command
  • Target languages
    • C++
    • C#
    • Golang
    • Java
    • JavaScript
    • Kotlin
    • PHP
    • Python
    • Scala
    • TypeScript
  • Target databases (SQL)
    • Predefined rules
    • Specific rules
    • Type size and precision
  • Telosys with Git
    • GitHub usage
    • Install with Git
    • Publish with Git
  • Support the project
  • How to contribute
  • Sponsors
  • IDE and editors
  • Telosys 3 Eclipse plugin
    • Eclipse plugin installation
    • Eclipse customization
    • Telosys 3 database model
Powered by GitBook
On this page
  • Standard variables
  • Special characters
  • Project configuration
  • Specific variables
  1. Bundles of templates

Telosys variables

Telosys provides a set of predefined variables which can be used in all template files.

Standard variables

Standard variables have predefined names, their values are either set by Telosys or can be defined in the project configuration.

Special characters

These variables are used to simplify the writing of templates when certain special characters are required and are difficult to mix with Velocity syntax.

These variables should be considered as "constants" and used as such.

Variable name

Variable value

$DOLLAR (dollar character)

$

$SHARP (sharp character)

#

$AMP (ampersand character)

&

$QUOT (double quotation mark)

"

$LT (less-than sign)

<

$GT (greater-than sign)

>

$LBRACE (left brace)

{

$RBRACE (right brace)

}

$NEWLINE (new line character)

\n

$TAB (tabulation character)

\t

Project configuration

These variables are specific for each project. They can be defined in the project configuration file ( "telosys-tools.cfg" )

All the project configuration variables are usable in both templates files (".vm" files) and bundle configuration file ("templates.cfg").

Directories

Variable name

Configuration value

$SRC

Directory where to generate sources

e.g. "src/main/java", "src"

$RES

Directory where to generate resources

e.g. "src/main/resources", "conf"

$WEB

Directory where to generate web files

e.g. "src/main/webapp", "www"

$TEST_SRC

Directory where to generate test sources

e.g. "src/test/java"

$TEST_RES

Directory where to generate test resources

e.g. "src/test/resources"

$DOC

Directory where to generate documentation files e.g "doc"

$TMP

Directory where to generate temporary files

e.g. "tmp", "temp"

Packages

Variables usable for target languages having a notion of "packages" or "modules" or "namespaces" (Java, Golang, C#, etc)

Variable name

Configuration value

$ROOT_PKG

The root package containing all other packages

$ENTITY_PKG

The package containing the entities classes or structures

Specific variables

If you need more variables for your project you can define them in the project configuration file "telosys-tools.cfg".

Once defined, these specific variables are usable exactly like standard variables.

You can use them in both templates files (".vm" files) and bundle configuration file ("templates.cfg").

PreviousTelosys directivesNextTelosys objects

Last updated 1 year ago

See :

Configuration and variables