Home | Docs | Download | SourceForge.net Logo
-> introduction | wizard | actions | ant | templates Rate this resource

Wizard

To use a new template, you have to choose File->New->Other->"Simteec Templates"

You are then taken to the first wizard page where you can choose the filename and the location of the file which should be used to receive the parsed content. After clicking Next, the second and last wizard page will be displayed which lets you choose the template and the properties file for the parsing process.



Final notes - If you want to create your own templates, please keep in mind, that your template file should have the extension ".vm". The corresponding example property file must then have the same name, must be in the same folder and must end with ".prop". If you keep this conventions in mind, you can choose your template file by using the browse button on the second wizard page and the template file with it's corresponsing properties file will be loaded into the text areas and can then be edited manually.

A simple example - Tutorial

Example template file:

a simple variable: $StringVariable

-------------------------------------
this is how you can use lists/arrays:

#foreach( $name in $array )
	name: $name   namelength: $name.length()
#end

-------------------------------------
this is how you can use maps/hashes:

#foreach( $key in $person.keySet() )
	key: $key   value:  $person.get($key)
#end
		
Example properties file:

# property file
# -------------
StringVariable = "Hello World";
array = @( "John", "Bob", "Trinity" );
person = %(
    "age"=>"5",
    "eyecolor"=>"brown",
    "height" => "1,6m",
    "specialChars" => "!§$%&/()=?`*Ü'ÄÖüäö_:;,.- \" "
);

		
Generated output:

a simple variable: Hello World

-------------------------------------
this is how you can use lists/arrays:

	name: John   namelength: 4
	name: Bob   namelength: 3
	name: Trinity   namelength: 7

-------------------------------------
this is how you can use maps/hashes:

	key: age   value:  5
	key: eyecolor   value:  brown
	key: height   value:  1,6m
	key: specialChars   value:  !§$%&/()=?`*Ü'ÄÖüäö_:;,.- " 

		


These page was generated using SIMTEEC on Tue Apr 06 19:39:53 CEST 2004.