Templates View

The templates view shows all the available wizards. To open some wizard, just double-click in one item in the treeviewer.

There is a XML file (wizards.xml) that configure the TreeViewer. You can create your own wizards, and customize this view.

The following xml file was used to create the TreeViewer (as you see in the image):


<?xml version="1.0" encoding="UTF-8"?>
<templates>
	<category name="1 - Simple">
		<wizards>
			<wizard-def description="Hello" template="1-simple/1-hello/wizard.xml"/>
			<wizard-def description="Type Component (POJO)" template="1-simple/2-type/wizard.xml"/>
			<wizard-def description="UI Components" template="1-simple/3-all-components/wizard.xml"/>
			<wizard-def description="The Model-Page" template="1-simple/4-model-page/wizard.xml"/>
		</wizards>
	</category>
	<category name="2 - Advanced">
		<wizards>
			<wizard-def description="Next -> Next -> Finish" template="2-advanced/1-next-next/wizard.xml"/>
			<wizard-def description="More than one Template" template="2-advanced/2-more-than-one-template/wizard.xml"/>
			<wizard-def description="Velocity Expressions" template="2-advanced/3-expression/wizard.xml"/>
			<wizard-def description="StringUtils" template="2-advanced/4-stringUtils/wizard.xml"/>
			<wizard-def description="The Component element" template="2-advanced/5-component/wizard.xml"/>
			<wizard-def description="Servlet + JSP" template="2-advanced/6-component-servlet-jsp-example/wizard.xml"/>
			<wizard-def description="Conditional code generation" template="2-advanced/7-conditional-templates/wizard.xml"/>
			<wizard-def description="Create new method and fields (Java Class)" template="2-advanced/8-update-java/wizard.xml"/>
			<wizard-def description="Conditional Page" template="2-advanced/9-conditional-page/wizard.xml"/>
		</wizards>
	</category>
	<category name="3 - Advanced UI">
		<wizards>
			<wizard-def description="Group the elements" template="3-advanced-ui/1-group-enable-disable/wizard.xml"/>
			<wizard-def description="Conditional Radio" template="3-advanced-ui/2-radio-conditional/wizard.xml"/>
		</wizards>
	</category>
	<category name="4 - Database Reverse Engineering">
		<wizards>
			<wizard-def description="ModelPage: Table type" template="4-database/1-model-table-page/wizard.xml"/>
			<wizard-def description="ModelPage: SQL type" template="4-database/2-model-sql-page/wizard.xml"/>
		</wizards>
	</category>
	<category name="5 - Miss">
		<wizards>
			<wizard-def description="ModelPage: Table type" template="5-miss/1-variables-page/wizard.xml"/>
			<wizard-def description="ModelPage: SQL type" template="5-miss/2-static-variables/wizard.xml"/>
		</wizards>
	</category>
</templates>

Window Preferences

After create the "wizards.xml", you must be set it in the Window-Preferences.

That's it! EclipseWork will parse the XML file and create the TemplatesView.

Project Properties

Sometimes the Java project has more than one "source folder".

In the Project Properties, it's possible to configure the correct source folder used for output files (code generation).

The Templates

The "wizards.xml" file showed here is available for download. There are many useful examples that you can study to understand the EclipseWork features.

You can download the Examples here.

EclipseWork let's you create the templates using Velocity or Fremarker.

The templates "path" is always relative to the "wizards.xml" file.