<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting started with Xtext, part 2</title>
	<atom:link href="http://www.peterfriese.de/getting-started-with-xtext-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/</link>
	<description>mobile / model-driven</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: someone</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3487</link>
		<dc:creator>someone</dc:creator>
		<pubDate>Fri, 07 Oct 2011 18:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3487</guid>
		<description>I&#039;m just following the tutorial (by the way, thanks for it!!) and trying with the mydsl example. So I&#039;m not an expert, but in my opinion, and as far as I&#039;ve understood, the problem that you have is that with the line code &quot;expand = &quot;templates::Entity::entity FOREACH entity&quot;&quot; you must have a template file named Entity. 

Regards,</description>
		<content:encoded><![CDATA[<p>I&#8217;m just following the tutorial (by the way, thanks for it!!) and trying with the mydsl example. So I&#8217;m not an expert, but in my opinion, and as far as I&#8217;ve understood, the problem that you have is that with the line code &#8220;expand = &#8220;templates::Entity::entity FOREACH entity&#8221;" you must have a template file named Entity. </p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A very simple case study &#171; M. L. B.</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3448</link>
		<dc:creator>A very simple case study &#171; M. L. B.</dc:creator>
		<pubDate>Thu, 28 Apr 2011 15:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3448</guid>
		<description>[...] So, please, take everything with a grain of salt. (If you want a well-done tutorial, look here and here [...]</description>
		<content:encoded><![CDATA[<p>[...] So, please, take everything with a grain of salt. (If you want a well-done tutorial, look here and here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magento themes</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3444</link>
		<dc:creator>magento themes</dc:creator>
		<pubDate>Wed, 20 Apr 2011 07:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3444</guid>
		<description>Create a template for Java beans --I was exactly looking for this stuff finally got it, any ways it is good to know about this, I have saved the whole post to my document this post made my work easier, will surely implement it after commenting. </description>
		<content:encoded><![CDATA[<p>Create a template for Java beans &#8211;I was exactly looking for this stuff finally got it, any ways it is good to know about this, I have saved the whole post to my document this post made my work easier, will surely implement it after commenting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthias</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3441</link>
		<dc:creator>Matthias</dc:creator>
		<pubDate>Thu, 07 Apr 2011 14:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3441</guid>
		<description>Hey Peter,
I have the same problem as Robin befor and even with the changes you suggested it&#039;s not running.

My EntityGenerator.mwe2 file looks as followed:

module workflow.EntityGenerator

import org.eclipse.emf.mwe.utils.*

var targetDir = &quot;src-gen&quot;
var fileEncoding = &quot;Cp1252&quot;
var modelPath = &quot;src/model&quot;

Workflow {

component = org.eclipse.xtext.mwe.Reader {
// lookup all resources on the classpath
// useJavaClassPath = true

// or define search scope explicitly
path = modelPath

// this class will be generated by the xtext generator
register = org.xtext.example.EntityStandaloneSetup {}
load = {
slot = &quot;entity&quot;
type = &quot;Entity&quot;
}
}

component = org.eclipse.xpand2.Generator {
expand = &quot;templates::Entity::entity FOREACH entity&quot;

outlet = {
path = targetDir
}
fileEncoding = fileEncoding
}
}

If i try to run the workflow i get the error: 
Error in Component  of type org.eclipse.xpand2.Generator: 
	EvaluationException : No Definition &#039;templates::Entity::entity for org::xtext::example::entity::impl::EntityImpl&#039; found!

Would be great if you could help me.</description>
		<content:encoded><![CDATA[<p>Hey Peter,<br />
I have the same problem as Robin befor and even with the changes you suggested it&#8217;s not running.</p>
<p>My EntityGenerator.mwe2 file looks as followed:</p>
<p>module workflow.EntityGenerator</p>
<p>import org.eclipse.emf.mwe.utils.*</p>
<p>var targetDir = &#8220;src-gen&#8221;<br />
var fileEncoding = &#8220;Cp1252&#8243;<br />
var modelPath = &#8220;src/model&#8221;</p>
<p>Workflow {</p>
<p>component = org.eclipse.xtext.mwe.Reader {<br />
// lookup all resources on the classpath<br />
// useJavaClassPath = true</p>
<p>// or define search scope explicitly<br />
path = modelPath</p>
<p>// this class will be generated by the xtext generator<br />
register = org.xtext.example.EntityStandaloneSetup {}<br />
load = {<br />
slot = &#8220;entity&#8221;<br />
type = &#8220;Entity&#8221;<br />
}<br />
}</p>
<p>component = org.eclipse.xpand2.Generator {<br />
expand = &#8220;templates::Entity::entity FOREACH entity&#8221;</p>
<p>outlet = {<br />
path = targetDir<br />
}<br />
fileEncoding = fileEncoding<br />
}<br />
}</p>
<p>If i try to run the workflow i get the error:<br />
Error in Component  of type org.eclipse.xpand2.Generator:<br />
	EvaluationException : No Definition &#8216;templates::Entity::entity for org::xtext::example::entity::impl::EntityImpl&#8217; found!</p>
<p>Would be great if you could help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Friese</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3425</link>
		<dc:creator>Peter Friese</dc:creator>
		<pubDate>Thu, 17 Feb 2011 12:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3425</guid>
		<description>Robin,

MWE2 operates slightly different than MWE. From the top of my head, you probably need to change the MWE2 workflow file so you directly invoke the Entity::entity template. Like this:

component = org.eclipse.xpand2.Generator {
  expand = &quot;templates::Entity::entity FOREACH entity&quot;

Hope this helps.</description>
		<content:encoded><![CDATA[<p>Robin,</p>
<p>MWE2 operates slightly different than MWE. From the top of my head, you probably need to change the MWE2 workflow file so you directly invoke the Entity::entity template. Like this:</p>
<p>component = org.eclipse.xpand2.Generator {<br />
  expand = &#8220;templates::Entity::entity FOREACH entity&#8221;</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3424</link>
		<dc:creator>Robin</dc:creator>
		<pubDate>Thu, 17 Feb 2011 11:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3424</guid>
		<description>Hi, Peter! It seems that your example is not working anymore with xtext 1.0 regarding the generator (mwe now is mwe2). I tried around but I am not succeeding in setting up the EntityGenerator.mwe2 right.

module workflow.EntityGenerator

import org.eclipse.emf.mwe.utils.*

var targetDir = &quot;src-gen&quot;
var fileEncoding = &quot;Cp1252&quot;
var modelPath = &quot;src/model&quot;

Workflow {

	component = org.eclipse.xtext.mwe.Reader {
		// lookup all resources on the classpath
		// useJavaClassPath = true

		// or define search scope explicitly
		path = modelPath

		// this class will be generated by the xtext generator 
		register = org.xtext.example.EntityStandaloneSetup {}
		load = {
			slot = &quot;entity&quot;
			type = &quot;Entity&quot;
		}
	}

	component = org.eclipse.xpand2.Generator {
		expand = &quot;templates::Main::main FOREACH Model&quot;
		outlet = {
			path = targetDir
		}
		fileEncoding = fileEncoding
	}
}

The crucial line seems to be
expand = &quot;templates::Main::main FOREACH Model&quot;
but this gives &quot;EvaluationException : Couldn&#039;t find type or property &#039;Model&#039;&quot;
The same error occurs if you change &#039;Model&#039; to &#039;model&#039;, &#039;Entity&#039;, &#039;entity&#039; or &#039;entity::Entity&#039;.

If you also change the Reader component:

module workflow.EntityGenerator

import org.eclipse.emf.mwe.utils.*

var targetDir = &quot;src-gen&quot;
var fileEncoding = &quot;Cp1252&quot;
var modelPath = &quot;src/model&quot;

Workflow {

	component = org.eclipse.xtext.mwe.Reader {
		// lookup all resources on the classpath
		// useJavaClassPath = true

		// or define search scope explicitly
		path = modelPath

		// this class will be generated by the xtext generator 
		register = org.xtext.example.EntityStandaloneSetup {}
		load = {
			slot = &quot;model&quot;
			type = &quot;Model&quot;
		}
	}

	component = org.eclipse.xpand2.Generator {
		expand = &quot;templates::Main::main FOREACH model&quot;
		outlet = {
			path = targetDir
		}
		fileEncoding = fileEncoding
	}
}

You get no generation:
284  [main] WARN      org.eclipse.xtext.mwe.SlotEntry  - Could not find any exported element of type &#039;Model&#039; -&gt; Slot &#039;model&#039; is empty.
341  [main] INFO  .emf.mwe2.runtime.workflow.Workflow  - Done.

It would really make my day if you could help me out here.</description>
		<content:encoded><![CDATA[<p>Hi, Peter! It seems that your example is not working anymore with xtext 1.0 regarding the generator (mwe now is mwe2). I tried around but I am not succeeding in setting up the EntityGenerator.mwe2 right.</p>
<p>module workflow.EntityGenerator</p>
<p>import org.eclipse.emf.mwe.utils.*</p>
<p>var targetDir = &#8220;src-gen&#8221;<br />
var fileEncoding = &#8220;Cp1252&#8243;<br />
var modelPath = &#8220;src/model&#8221;</p>
<p>Workflow {</p>
<p>	component = org.eclipse.xtext.mwe.Reader {<br />
		// lookup all resources on the classpath<br />
		// useJavaClassPath = true</p>
<p>		// or define search scope explicitly<br />
		path = modelPath</p>
<p>		// this class will be generated by the xtext generator<br />
		register = org.xtext.example.EntityStandaloneSetup {}<br />
		load = {<br />
			slot = &#8220;entity&#8221;<br />
			type = &#8220;Entity&#8221;<br />
		}<br />
	}</p>
<p>	component = org.eclipse.xpand2.Generator {<br />
		expand = &#8220;templates::Main::main FOREACH Model&#8221;<br />
		outlet = {<br />
			path = targetDir<br />
		}<br />
		fileEncoding = fileEncoding<br />
	}<br />
}</p>
<p>The crucial line seems to be<br />
expand = &#8220;templates::Main::main FOREACH Model&#8221;<br />
but this gives &#8220;EvaluationException : Couldn&#8217;t find type or property &#8216;Model&#8217;&#8221;<br />
The same error occurs if you change &#8216;Model&#8217; to &#8216;model&#8217;, &#8216;Entity&#8217;, &#8216;entity&#8217; or &#8216;entity::Entity&#8217;.</p>
<p>If you also change the Reader component:</p>
<p>module workflow.EntityGenerator</p>
<p>import org.eclipse.emf.mwe.utils.*</p>
<p>var targetDir = &#8220;src-gen&#8221;<br />
var fileEncoding = &#8220;Cp1252&#8243;<br />
var modelPath = &#8220;src/model&#8221;</p>
<p>Workflow {</p>
<p>	component = org.eclipse.xtext.mwe.Reader {<br />
		// lookup all resources on the classpath<br />
		// useJavaClassPath = true</p>
<p>		// or define search scope explicitly<br />
		path = modelPath</p>
<p>		// this class will be generated by the xtext generator<br />
		register = org.xtext.example.EntityStandaloneSetup {}<br />
		load = {<br />
			slot = &#8220;model&#8221;<br />
			type = &#8220;Model&#8221;<br />
		}<br />
	}</p>
<p>	component = org.eclipse.xpand2.Generator {<br />
		expand = &#8220;templates::Main::main FOREACH model&#8221;<br />
		outlet = {<br />
			path = targetDir<br />
		}<br />
		fileEncoding = fileEncoding<br />
	}<br />
}</p>
<p>You get no generation:<br />
284  [main] WARN      org.eclipse.xtext.mwe.SlotEntry  &#8211; Could not find any exported element of type &#8216;Model&#8217; -&gt; Slot &#8216;model&#8217; is empty.<br />
341  [main] INFO  .emf.mwe2.runtime.workflow.Workflow  &#8211; Done.</p>
<p>It would really make my day if you could help me out here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3284</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Wed, 28 Apr 2010 12:56:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3284</guid>
		<description>Hello, Peter. I have one question. I made a DSL in xtext and now I want to make a graphical model for it. How can I invoke the objects from my DSL from another project? I&#039;ve been searching in the source codes for two days and I cannot figure it out. Thank you. And please excuse for this relatively off-topic question.</description>
		<content:encoded><![CDATA[<p>Hello, Peter. I have one question. I made a DSL in xtext and now I want to make a graphical model for it. How can I invoke the objects from my DSL from another project? I&#8217;ve been searching in the source codes for two days and I cannot figure it out. Thank you. And please excuse for this relatively off-topic question.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chinua</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3201</link>
		<dc:creator>Chinua</dc:creator>
		<pubDate>Tue, 23 Mar 2010 17:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3201</guid>
		<description>Hi Peter,

Great Job!

I am very interested in a real world example as requested by Paul.

Cheers
CHINUA</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Great Job!</p>
<p>I am very interested in a real world example as requested by Paul.</p>
<p>Cheers<br />
CHINUA</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3198</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Fri, 19 Mar 2010 18:41:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3198</guid>
		<description>Peter,
first of all thank you very much for your fast answer to my question. I am new to Xtext/Xpand and I still need to find my way through the jungle. I have searched the internet quite a lot for this answer, but didn&#039;t find anything. So maybe it is time for a more real world example :-)

Cheers Paul</description>
		<content:encoded><![CDATA[<p>Peter,<br />
first of all thank you very much for your fast answer to my question. I am new to Xtext/Xpand and I still need to find my way through the jungle. I have searched the internet quite a lot for this answer, but didn&#8217;t find anything. So maybe it is time for a more real world example <img src='http://www.peterfriese.de/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Cheers Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.peterfriese.de/getting-started-with-xtext-part-2/comment-page-1/#comment-3193</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 18 Mar 2010 21:23:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.peterfriese.de/?p=298#comment-3193</guid>
		<description>Paul,
creating projects actually is quite easy: just create all files required. There is no such thing as a &quot;create an Eclipse project&quot; statement in Xpand, so you have to create all the files on your own. After the generator has created all those files, you can import the resulting project into your workspace. If you embed your generator in an Eclipse wizard, you can use the workspace resource API to create a project for you and have your generator create all remaining files. It really depends on your use case.</description>
		<content:encoded><![CDATA[<p>Paul,<br />
creating projects actually is quite easy: just create all files required. There is no such thing as a &#8220;create an Eclipse project&#8221; statement in Xpand, so you have to create all the files on your own. After the generator has created all those files, you can import the resulting project into your workspace. If you embed your generator in an Eclipse wizard, you can use the workspace resource API to create a project for you and have your generator create all remaining files. It really depends on your use case.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

