Changes for page Custom Project Templates
Last modified by Bastian Triller on 2009/04/11 21:03
From version 56.1
edited by David Avendasora
on 2009/04/11 20:08
on 2009/04/11 20:08
Change comment:
There is no comment for this version
To version 55.1
edited by David Avendasora
on 2009/04/07 05:47
on 2009/04/07 05:47
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -89,28 +89,30 @@ 89 89 90 90 So now that you have template input defined, you will want to be able to use them. The name use used in the "name" attribute of your input declaration will be the name of the variable in your Velocity context. For instance, in the example above, the Velocity variable "linkToWonderProjects" will be bound to the boolean value corresponding to the user's selection, and can be used just like any other velocity variable. The Apache project provides a [[Velocity reference guide>>http://velocity.apache.org/engine/devel/vtl-reference-guide.html]]. 91 91 92 -As an example, the .classpath file can be modifiedto automatically add a linkto theJavaWOJSPServlet.framework iftheuseris promptedandselects"DeploytoServletContainer"inthethe new project wizard.92 +As an example, the Wonder Application template's .classpath file is defined as: 93 93 94 94 {{code value="xml"}} 95 95 96 96 <?xml version="1.0" encoding="UTF-8"?> 97 -<classpath> 98 - <classpathentry kind="src" path="Sources"/> 99 - <classpathentry kind="con" path="WOFramework/JavaEOAccess"/> 100 - <classpathentry kind="con" path="WOFramework/JavaEOControl"/> 101 - <classpathentry kind="con" path="WOFramework/JavaFoundation"/> 102 - <classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/> 103 - <classpathentry kind="con" path="WOFramework/JavaWebObjects"/> 104 - <classpathentry kind="con" path="WOFramework/JavaXML"/> 105 - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 106 -#if ($servletDeployment) 107 - <classpathentry kind="con" path="WOFramework/JavaWOJSPServlet"/> 108 -#end 109 - <classpathentry kind="output" path="bin"/> 110 -</classpath> 97 + <classpath> 98 + <classpathentry kind="src" path="Sources"/> 99 + #if ($linkToWonderProjects) 100 + <classpathentry combineaccessrules="false" kind="src" path="/ERJars"/> 101 + <classpathentry combineaccessrules="false" kind="src" path="/ERExtensions"/> 102 + <classpathentry combineaccessrules="false" kind="src" path="/ERPrototypes"/> 103 + <classpathentry combineaccessrules="false" kind="src" path="/JavaWOExtensions"/> 104 + #end 105 + #if ($linkToWonderFrameworks) 106 + <classpathentry kind="con" path="org.objectstyle.wolips.WO_CLASSPATH/ERExtensions/ERJars/ERPrototypes/JavaWOExtensions/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/> 107 + #else 108 + <classpathentry kind="con" path="org.objectstyle.wolips.WO_CLASSPATH/JavaEOAccess/JavaEOControl/JavaFoundation/JavaJDBCAdaptor/JavaWebObjects/JavaXML"/> 109 + #end 110 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> 111 + <classpathentry kind="output" path="bin"/> 112 + </classpath> 111 111 112 112 {{/code}} 113 113 114 -In addition to variables inside of Velocity templates, you can also use template variables in folderand file names. However, because $ is not allowed on some filesystems, we instead surround the variable names with "" (for instance $someVariable would be someVariable in the filename or path). As an example, the Wonder Application template has an input named "basePackage" (of type Package), which creates a magic variable named "basePackage//folder" (where the dots are turned into slashes), and the Source folder on the filesystem is named "Wonder Application/Sources///basePackage//folder//".116 +In addition to variables inside of Velocity templates, you can also use template inputs in folder names. However, because $ is not allowed on some filesystems, we instead surround the variable names with "//" (for instance $someVariable would be //someVariable in the filename or path). As an example, the Wonder Application template has an input named "basePackage" (of type Package), which creates a magic variable named "basePackage//folder" (where the dots are turned into slashes), and the Source folder on the filesystem is named "Wonder Application/Sources///basePackage//folder//". 115 115 116 116 Happy templating