Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Code Generation Templates
Code Generation Templates [message #146980] Tue, 02 March 2004 11:02 Go to next message
Eclipse UserFriend
Originally posted by: phil.williams.toadmail.com

I am using Eclipse 2.1.2 and under Window>Java>Code Generation there is
an "Import..." button on the "Code and Comments" tab that allows
importing a new template for code generation. It appears to want an XML
file that defines the template. I would like to add a template here but
I can not find anything that documents the format or DTD for this XML
file. I have 2 questions:

1) Where can I find examples or the DTD for these templates?
2) Is this still supported in 3.0 and if so will I have to make changes
when I migrate to 3.0?

Thanks,
Phil
Re: Code Generation Templates [message #147043 is a reply to message #146980] Tue, 02 March 2004 13:20 Go to previous messageGo to next message
Eclipse UserFriend
Once can create they're own examples simply by exporting the existing
template. Export is available at the same location as import.


On Tue, 02 Mar 2004 11:02:11 -0500, Phil Williams
<phil.williams@toadmail.com> wrote:

>I am using Eclipse 2.1.2 and under Window>Java>Code Generation there is
>an "Import..." button on the "Code and Comments" tab that allows
>importing a new template for code generation. It appears to want an XML
>file that defines the template. I would like to add a template here but
>I can not find anything that documents the format or DTD for this XML
>file. I have 2 questions:
>
>1) Where can I find examples or the DTD for these templates?
>2) Is this still supported in 3.0 and if so will I have to make changes
>when I migrate to 3.0?
>
>Thanks,
>Phil
Re: Code Generation Templates [message #147110 is a reply to message #146980] Wed, 03 March 2004 02:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hcs33.egon.gyaloglo.hu

Hi,

Afaik you cannot extend those code templates, only change its content
(import simply restore data from an xml you got when you export them). If
you have common code snippets you do not want to type again and again see
Window>Java>Editor>Templates. These templates are available via code assist
(ctrl+space).
And yes, both of them (Code Generation and Templates) are in Eclipse 3.0 as
well, and both of them are improved. I don't know whether you can import a
2.1 code generation xml into 3.0 but I think you can.

HTH,
Regards,
Csaba

"Phil Williams" <phil.williams@toadmail.com> wrote in message
news:c22av6$bro$1@eclipse.org...
> I am using Eclipse 2.1.2 and under Window>Java>Code Generation there is
> an "Import..." button on the "Code and Comments" tab that allows
> importing a new template for code generation. It appears to want an XML
> file that defines the template. I would like to add a template here but
> I can not find anything that documents the format or DTD for this XML
> file. I have 2 questions:
>
> 1) Where can I find examples or the DTD for these templates?
> 2) Is this still supported in 3.0 and if so will I have to make changes
> when I migrate to 3.0?
>
> Thanks,
> Phil
Re: Code Generation Templates [message #147147 is a reply to message #146980] Wed, 03 March 2004 08:47 Go to previous message
Eclipse UserFriend
Phil Williams wrote:
> I am using Eclipse 2.1.2 and under Window>Java>Code Generation there is
> an "Import..." button on the "Code and Comments" tab that allows
> importing a new template for code generation. It appears to want an XML
> file that defines the template. I would like to add a template here but
> I can not find anything that documents the format or DTD for this XML
> file. I have 2 questions:
>
> 1) Where can I find examples or the DTD for these templates?
> 2) Is this still supported in 3.0 and if so will I have to make changes
> when I migrate to 3.0?

Yes. Plus, with 3.0, the template mechanism is becoming public API.
Watch https://bugs.eclipse.org/bugs/show_bug.cgi?id=11020 to track its
changes / enhancements.

-tom
Previous Topic:strange effect in eclipse help
Next Topic:Using Absolute Address as in Windows Explorer
Goto Forum:
  


Current Time: Wed Jun 04 15:47:14 EDT 2025

Powered by FUDForum. Page generated in 0.02959 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top