Home Documents Project

Project

Overview

Use project to organize folders and templates for your project (or solution in visual studio)

Settings

The following properties can be setted for a project, and you can change them by File -> Project Properties at any time.

  • Project Name
  • Path Information:
    1. Project Path
      In which place to store the project files
    2. Destination Path
      In which place to store the generated files
  • Clear target: indicates whether to clear the target folder or not when generate project files

 

Create A New Project

  1. Select File -> New Project...
  2. Input project name, path information
  3. Click OK to create the project

The Next Steps:

  • Click 'Database' to specify the database information
  • Create your folder/templates

 

Open Existed Project

  1. Select File -> Open Project...
  2. Select project xml file, and click OK to open the project

The Next Steps:

  • Click 'Database' to specify the database information
  • Create or edit your folder/templates
  • Generate templates for a template, a folder, whole project or batch generate part of them

 

Project Level Script

You can also add project level script, which only applyed to all the templates in the current project.

E.g. You should use project level scripts in the following cases:

  • Package declaration. declare your package information. e.g. var BASE_PACKAGE = 'org.yourorg.'. and in the class file, use <%=BASE_PACKAGE%>action, which will get org.yourorg.action
  • Datatype mapping between db and domain object. You can define function to do the map in project level. please reference 'Data types map between DB and domain object' in 'How To...' section.
  • Group Tables. you can define a function to group the tables. e.g. getGroup(tablename), so you can put some tables in one folder or one package, or anything you want
  • Anything you want to do for this project, not for a template

 

Last Updated on Monday, 26 January 2009 09:00