CyLog Software Homepage BeanMaker v2.10
Copyright ©2000-2006 CyLog Software
Introduction
Quick Guide
How the engine works
Writing Templates
   Standard Tags
   Property Loop Tags
   Switch Tags
   Include File Tag
   Regular Expression Tag
   String Function Tags
   Numeric Function Tags
   
Tutorials
Registration
License Agreement

Writing Templates - Include File Tag

BeanMaker's Include File Tag can be used to insert a template inside a template. An example of this can be a "header" template that is used by all other templates. The Include File Tag should be the only tag in a line of text - anything else before or after the tag on the same text line will be ignored.

Syntax:
    $include('filename')$

For example, let's assume that you want to include the following template in the beginning of any Java class:

/*
 * Example of using standard tags on a file header
 * 
 * Copyright 2005 CyLog All Rights Reserved.
 *
 * Package: $package$
 * Class:   $class$.java
 */
// ---- Package Declaration ---------------------------------------------------
package $package$;

// ---- Import Statements -----------------------------------------------------
import java.util.*;
import java.io.*;

You can save the above code as "header.tpl" and then include it in another template like:

  $include('header.tpl')$
  
  public class $class$
  {
        ....
  }
Copyright ©2000-2006 CyLog Software    www.cylog.org