Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » shipping predifind templates with your editor(shipping predifind templates with your editor)
shipping predifind templates with your editor [message #651820] Tue, 01 February 2011 17:38 Go to next message
Dani is currently offline DaniFriend
Messages: 41
Registered: October 2010
Member
Hi All,
I am talking with reference to the document
http://blogs.itemis.de/stundzig/archives/474. this article contains method to ship predefined templates in XText Editor but it is not working for me. Can any one tell me whether I have to add some thing more to Xtext generated folder? I also add ID to template but it is not appearing. waiting for reply


/Dani
Re: shipping predifind templates with your editor [message #651845 is a reply to message #651820] Tue, 01 February 2011 18:30 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
I supply preconfigured templates in Eclipse b3 - check it out in the
Eclipse SVN for b3 if you are interested. It works fine.
- henrik

On 2/1/11 6:38 PM, Dani wrote:
> Hi All,
> I am talking with reference to the document
> http://blogs.itemis.de/stundzig/archives/474 this article contains
> method to ship predefined templates in XText Editor but it is not
> working for me. Can any one tell me whether I have to add some thing
> more to Xtext generated folder? I also add ID to template but it is not
> appearing. waiting for reply
>
>
> /Dani
Re: shipping predifind templates with your editor [message #651855 is a reply to message #651845] Tue, 01 February 2011 19:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

this file works for me with the std hello world dsl

<?xml version="1.0" encoding="UTF-8"?>
<templates>
	<template 
	  name="Greeting" 
	  description="a new Greeting"
	  id="org.xtext.example.mydsl.myDsl.Model"
	  context="org.xtext.example.mydsl.MyDsl.Model"
	  enabled="true">Hello ${name}!
	</template>
	<template 
	  name="Greeting" 
	  description="a new Greeting"
	  id="org.xtext.example.mydsl.myDsl.Greeting"
	  context="org.xtext.example.mydsl.MyDsl.Greeting"
	  enabled="true">Hello ${name}!
	</template>
</templates>


Please check if your context is ok

btw you can inspect the templates via window -> preferences -> my dsl -> templates

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: shipping predifind templates with your editor [message #652297 is a reply to message #651855] Thu, 03 February 2011 14:00 Go to previous messageGo to next message
Dani is currently offline DaniFriend
Messages: 41
Registered: October 2010
Member
Hi Christian and Henrik,
Thank you very much for your help the problem is solved now I can your my templates in a good way!


/Dani
Re: shipping predifind templates with your editor [message #652741 is a reply to message #652297] Sun, 06 February 2011 02:34 Go to previous messageGo to next message
Dani is currently offline DaniFriend
Messages: 41
Registered: October 2010
Member
Hello Christian and Henrik,
Actually I am facing one more problem that is when I deploy my xtext plugins the templates are not shown, where as they are shown in running instance of eclipse do I need some more configuration?


Dani
Re: shipping predifind templates with your editor [message #652748 is a reply to message #652741] Sun, 06 February 2011 08:36 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

Please make sure that the templates folder is included in the build.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Providing an Xtext project as (self-contained) library
Next Topic:Eclipse Community Award
Goto Forum:
  


Current Time: Thu Apr 25 13:26:50 GMT 2024

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

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

Back to the top