Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
themeEclipse
linenumberstrue
#PARSER PQL
...

Remark: It is important to define the right parser as Odysseus cannot determine the parser based on the query text!

Comments

Comments mark lines that should be ignored by the parser. Useful for additional information for the reader. Comments are defined  by using three slashes per line. Currently, there is no way to comment multiple lines at once.

...

Variables can be used to reuse certain values. MostlyIn most cases, they are moved to the top of a file so that they become more clearlyvisible. A variable can be created by using #DEFINE and be removed by using #UNDEF. If a variable should be calculated out of from other variables (or constants), #EVAL can be used. To access a varibalevariable, the user has to write $ ${....}. The existence of a variable (if it is created or not) can be checked with #IFDEF. The value of a variable can be printed by using #PRINT (into the console). The following example shows three variables: an integer called "currentid" that has the value "50", a variable named "path", which has the value "F:/odysseus/example/" and a calculated variable "maxid".

...

SymbolValue
NOW

Current timestamp

WORKSPACE*The absolute path to the workspace
PROJECT*The project name
PROJECTPATH*The absolute path to the project
BUNDLE-ROOTsame as PROJECPATH but can additionally be used in tests and Autostart
WORKSPACEPROJECT*The absolute path to the workspace extended by the project name
ROOT*The absolute path to the current file
OS.ARCHThe operating system architecture
OS.VERSIONThe operating system version
OS.NAMEThe operating system name
CPUThe amount of available processors
MEMThe total amount of memory
VM.NAMEThe name of the Java VM
VM.VENDORThe vendor of the Java VM
VM.VERSIONThe version of the Java VM

...

Additionally, system properties provided by / environment variables provided by System.getProperty(...) and System.getPropertygetenv(...) are also available. To avoid nameing naming collisions, each system property has "_" as prefix. Example: ${_user.name} will be replaced with the current system user name (NOT the username in Odysseus).

...