Changes for page Custom Project Templates

Last modified by Bastian Triller on 2009/04/11 21:03

From version 36.1
edited by Mike Schrag
on 2007/10/03 16:15
Change comment: There is no comment for this version
To version 35.1
edited by Mike Schrag
on 2007/10/03 16:16
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -28,6 +28,8 @@
28 28  
29 29  An example template.xml is below:
30 30  
31 +{{code value="xml"}}
32 +
31 31   <?xml version="1.0" encoding="UTF-8"?>
32 32   <template name = "Wonder Application">
33 33   <inputs>
... ... @@ -51,6 +51,8 @@
51 51   </inputs>
52 52   </template>
53 53  
56 +{{/code}}
57 +
54 54  The "name" attribute of the template node overrides the name of the folder the templates are in. For instance, you could have the above template.xml inside a folder named "Template 1" and the template system would consider the name of the template to be "Wonder Application."
55 55  
56 56  Within a template, you can declare a single "inputs" node that can contain multiple "input" nodes. Each input node corresponds to a variable that will be presented to the user on the second page of the wizard. Each input specifies a "name" attribute, which will become the variable name of the input for later reference in the Velocity templates; and a "type" attribute which can be one of Boolean, String, or Integer. The type value determines the control that will be used to display the input to the user (String = text field, Boolean = checkbox, Integer = spinner, etc). Each input also contains a "question" node, whose value corresponds to the label of the control when displayed to the user. In the above example, the "linkToWonderFrameworks" will display a checkbox to the user with the label "Link to Wonder Frameworks?". Additionally, you can provide a "default" node that defines the default value of the variable. If a default is not specified, the default value will be null for all input types.
... ... @@ -63,6 +63,8 @@
63 63  
64 64  As an example, the Wonder Application template's .classpath file is defined as:
65 65  
70 +{{code value="xml"}}
71 +
66 66   <?xml version="1.0" encoding="UTF-8"?>
67 67   <classpath>
68 68   <classpathentry kind="src" path="Sources"/>
... ... @@ -73,12 +73,14 @@
73 73   <classpathentry combineaccessrules="false" kind="src" path="/JavaWOExtensions"/>
74 74   #end
75 75   #if ($linkToWonderFrameworks)
76 - <classpathentry kind="con" path="org.objectstyle.wolips.WO//CLASSPATH/ERExtensions/ERJars/ERPrototypes/JavaWOExtensions/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>
82 + <classpathentry kind="con" path="org.objectstyle.wolips.WO_CLASSPATH/ERExtensions/ERJars/ERPrototypes/JavaWOExtensions/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>
77 77   #else
78 - <classpathentry kind="con" path="org.objectstyle.wolips.WO//CLASSPATH/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>
84 + <classpathentry kind="con" path="org.objectstyle.wolips.WO_CLASSPATH/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>
79 79   #end
80 - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE//CONTAINER"/>
86 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
81 81   <classpathentry kind="output" path="bin"/>
82 - </classpath>//
88 + </classpath>
83 83  
90 +{{/code}}
91 +
84 84  Happy templating!