[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: Use an XML Template when creating a New XML File

Hi Dani,

The Wizard I'm using is just my own creation/extension to the New File option to allow for the creation of the file type that I am handling.
I wasn't aware that they were only code templates, I was hoping to re-use this Template Store to allow developers of my artifact the ability to customize the initial file creation similar to the "New Java Files" template in the JDT.


Ronan

Ronan Mulvaney wrote:

Hi,

Would really appreciate some help here in case I'm way off track.

What I am trying to do is define an XML template and when I create a new file, that this template gets used in the creation.

I have my org.eclipse.ui.editors.templates extension and this seems fine and shows up in the WST XML Template store.
What I am trying to figure out now is how this should get used when I create the file from my New File Wizard.

Can't speak for XML and have no clue which wizard you're using but normally the templates contributed via the mentioned extension are editor templates used when typing and not code templates used for code generation.


Dani

I can query and get the template, etc but I'm a bit confused then as to how to go about doing the replace of some of the TemplateVariables, well mainly if I was heading in the right direction, etc..

Thanks in advance.

Ronan