Trying to include templates.xml in xtext plugin [message #885756] |
Wed, 13 June 2012 14:36 |
Tim Student Messages: 12 Registered: May 2012 |
Junior Member |
|
|
Hi Guys,
I just read how to include templates out of an xml file to my Xtext plugin, but anyhow, it does not work. Therefore, I try to explain, what I have done. Hopefully someone can help me.
I created some templates out of the Window -> preferences page of my local eclipse-installation. Then I exported theese templates to an templates.xml.
I created a folder called templated in the org.xtext.xyz.mydsl.ui project, on the same directory level, as the src directory. I copied the templates.xml file inside it.
The content of my build.properties of the ui project looks like:
source.. = src/,\
src-gen/
bin.includes = META-INF/,\
.,\
plugin.xml,\
templates/
Have I somehow missed anything? I ran the mwe2 Workflow, generated the xtext artifacts and exported the plugin to the jar. files. When I include the file on another eclipse installation, the templates page in the preferences menu remains empty:-(
Thanks so far guys!
|
|
|
|
|
Re: Trying to include templates.xml in xtext plugin [message #885771 is a reply to message #885756] |
Wed, 13 June 2012 14:58 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Tim,
you have to add ID tags to the exported templates in the XML file. See
the reference docs for details.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 13.06.12 16:36, schrieb Tim Student:
> Hi Guys,
> I just read how to include templates out of an xml file to my Xtext
> plugin, but anyhow, it does not work. Therefore, I try to explain, what
> I have done. Hopefully someone can help me.
>
> I created some templates out of the Window -> preferences page of my
> local eclipse-installation. Then I exported theese templates to an
> templates.xml.
>
> I created a folder called templated in the org.xtext.xyz.mydsl.ui
> project, on the same directory level, as the src directory. I copied the
> templates.xml file inside it.
>
> The content of my build.properties of the ui project looks like:
>
> source.. = src/,\
> src-gen/
> bin.includes = META-INF/,\
> .,\
> plugin.xml,\
> templates/
>
> Have I somehow missed anything? I ran the mwe2 Workflow, generated the
> xtext artifacts and exported the plugin to the jar. files. When I
> include the file on another eclipse installation, the templates page in
> the preferences menu remains empty:-(
>
> Thanks so far guys!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.12577 seconds