Changes for page Custom Project Templates
Last modified by Bastian Triller on 2009/04/11 21:03
From version 30.1
edited by Mike Schrag
on 2007/10/03 16:17
on 2007/10/03 16:17
Change comment:
There is no comment for this version
To version 33.1
edited by Mike Schrag
on 2007/10/03 16:14
on 2007/10/03 16:14
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,7 +2,7 @@ 2 2 3 3 To use a custom project template, select the "WO Project from Template" option under the WOLips category of the New Project Wizard. 4 4 5 -[[image: NewProjectFromTemplate.png]]5 +[[image:WOProjectFromTemplate.png]] 6 6 7 7 ==== Creating a Template ==== 8 8 ... ... @@ -10,8 +10,8 @@ 10 10 11 11 * The ProjectTemplates folder inside of the WOLips templateengine plugin jar 12 12 * /Library/Application Support/WOLips/Project Templates 13 -* YourHomeDirocuments and Settingspplication DataOLipsroject Templates 14 -* YourHomeDirocuments and SettingsppDataocalOLipsroject Templates 13 +* [[YourHomeDir]]ocuments and Settingspplication DataOLipsroject Templates 14 +* [[YourHomeDir]]ocuments and SettingsppDataocalOLipsroject Templates 15 15 * ,,/Library/Application Support/WOLips/Project Templates,, 16 16 17 17 Without any additional metadata, the template system derives the name of the template from the name of the folder in one of the above locations. For instance, if you create a folder named ",,/Library/Application Support/WOLips/Project Templates/Wonder Application," the template system will offer a template named "Wonder Application" in the template selection dialog. Project templates found later in the list of locations above will override those of the same name from earlier in the list. For instance, a "Wonder Application" template found in ,,/Library will overrode a "Wonder Application" template from /Library. ... ... @@ -28,8 +28,6 @@ 28 28 29 29 An example template.xml is below: 30 30 31 -{{code value="xml"}} 32 - 33 33 <?xml version="1.0" encoding="UTF-8"?> 34 34 <template name = "Wonder Application"> 35 35 <inputs> ... ... @@ -53,8 +53,6 @@ 53 53 </inputs> 54 54 </template> 55 55 56 -{{/code}} 57 - 58 58 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." 59 59 60 60 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. ... ... @@ -67,8 +67,6 @@ 67 67 68 68 As an example, the Wonder Application template's .classpath file is defined as: 69 69 70 -{{code value="xml"}} 71 - 72 72 <?xml version="1.0" encoding="UTF-8"?> 73 73 <classpath> 74 74 <classpathentry kind="src" path="Sources"/> ... ... @@ -79,14 +79,12 @@ 79 79 <classpathentry combineaccessrules="false" kind="src" path="/JavaWOExtensions"/> 80 80 #end 81 81 #if ($linkToWonderFrameworks) 82 - <classpathentry kind="con" path="org.objectstyle.wolips.WO _CLASSPATH/ERExtensions/ERJars/ERPrototypes/JavaWOExtensions/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>76 + <classpathentry kind="con" path="org.objectstyle.wolips.WO//CLASSPATH/ERExtensions/ERJars/ERPrototypes/JavaWOExtensions/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/> 83 83 #else 84 - <classpathentry kind="con" path="org.objectstyle.wolips.WO _CLASSPATH/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/>78 + <classpathentry kind="con" path="org.objectstyle.wolips.WO//CLASSPATH/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/> 85 85 #end 86 - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE _CONTAINER"/>80 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE//CONTAINER"/> 87 87 <classpathentry kind="output" path="bin"/> 88 - </classpath> 82 + </classpath>// 89 89 90 -{{/code}} 91 - 92 92 Happy templating!