MyEclipse: Customization of JSP Templates

cfrers - Mar 31, 2004 - 10:05 AM
Post subject: Customization of JSP Templates
Hi Riyad:
This may be an Eclipse rather than a MyEclipse question. We would like to configure how the template
jsp page should look like since we need to use and include our own project taglib and stylesheets.
Right now we simply replace the contents of a new jsp page with our own template but we need to do this every time.
Is there a more permanent way of predefining this in Eclipse/ME?

Claudia
support-rkalla - Mar 31, 2004 - 01:07 PM
Post subject:
Hi Claudia,
Yes there is a way for you to do this, and in a future release we look to make editing the templates part of MyEclipse. Right now its a more manual Find/Replace process.

Go to this location on your computer:
<myeclipse install directory>\eclipse\plugins\com.genuitec.eclipse.wizards_2.7.1\Templates

The names of the files are pretty self explanitory, but you can do some trial-and-error to find out which ones you want to replace.

Let us know if you have anymore questions.
cfrers - Mar 31, 2004 - 02:05 PM
Post subject:
support-rkalla wrote:
Hi Claudia,
Yes there is a way for you to do this, and in a future release we look to make editing the templates part of MyEclipse. Right now its a more manual Find/Replace process.

Go to this location on your computer:
<myeclipse install directory>\eclipse\plugins\com.genuitec.eclipse.wizards_2.7.1\Templates

The names of the files are pretty self explanitory, but you can do some trial-and-error to find out which ones you want to replace.

Let us know if you have anymore questions.

Hi Riyad:
This is great and pretty straightforward if we want to replace one of the existing templates. However, we need to have a list of templates to chooose from and we cannot find where ME defines this list so that we can simply add our own instead of doing a replace. Even if we can't do this we are very pleased to be able to define our own templates. Where is the list in the JSP wizard (Template to use) defined?
Claudia
support-rkalla - Mar 31, 2004 - 03:07 PM
Post subject:
I'll ask Michael to weigh in on this, as I am not sure.
support-michael - Apr 13, 2004 - 04:09 PM
Post subject:
Here's the process:

0) Create a new folder named:<myeclipse install>/eclipse/plugins/com.genuitec.eclipse.wizards/UserTemplates/.

1) Create a new template file and store it in the new UserTemplates folder. Use any existing template from the <myeclipse install>/eclipse/plugins/com.genuitec.eclipse.wizards/Templates/ folder as a guide.

2) Add the new template to the template registry file, see <myeclipse install>/eclipse/plugins/com.genuitec.eclipse.wizards/templates.properties. Back up this file before making mods.

For example, I add Mike's new fangled JSP Template to the registry as follows:

jsp.template.5=UserTemplates/MyNewSuperJSPTemplate.jsp
jsp.template.5.label=Best template ever

Note the pattern jsp.template.#. Ensure that all entries that you add/delete are sequential starting at #1.

3) You'll need to recycle MyEclipse to access the new template.

4) Please note at this time your custom templates and template registry will be overwritten with uninstalls and new MyEclipse installs. We have an open enhancement request for supporting user template libraries that will be addressed in a future release.
jjgould - May 25, 2004 - 03:54 PM
Post subject: Customization of JSP Templates (follow-up)
Hi, Riyan and Michael.

I have no trouble extending the templates.properties to add my own custom templates. My question is this:

Is there some documentation about what substitutions can be made by the wizard? I am referring to tags such as <aw:author/>

Thanks for your help!

- Jack Gould
Sherwin-Williams
support-scott - May 26, 2004 - 03:29 AM
Post subject:
Jack,

It's tricky to find (to say the least ;-), but what documentation there is is available at <myeclipse-install-dir>/eclipse/plugins/com.genuitec.eclipse.wizards_<version>/docs/wTemplateComplexFile_en.html
jasonpoley - Jun 03, 2004 - 04:25 AM
Post subject: much needed
I'd love to have customizable jsp templates. (via eclipse not rooting thru the plugins dir)

that would be very helpful.
support-rkalla - Jun 03, 2004 - 06:23 AM
Post subject:
I think we are going to try and address this soon, stay tuned.
support-michael - Jun 03, 2004 - 06:37 AM
Post subject:
See feedback at http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=2153
support-rkalla - Jun 03, 2004 - 03:31 PM
Post subject:
Wow, that was soon :D
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits