<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6255758224607466565</id><updated>2011-12-20T05:22:18.986+01:00</updated><category term='Xtext'/><category term='Xdoc'/><category term='Helios'/><category term='MWE'/><category term='Eclipse'/><title type='text'>Eszetts blog</title><subtitle type='html'>Blog of Sebastian Zarnekow</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-4908543676779130915</id><published>2011-11-03T16:41:00.000+01:00</published><updated>2011-11-03T16:43:14.928+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtend @ EclipseCon Europe 2011</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: left;"&gt;The second day of the EclipseCon Europe 2011 is almost over and so far it's been a very nice conference. The sessions that I attended were quite interesting and the 10th birthday party was very nice. The folks from the Eclipse community are really sociable!&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-IaAh9poW8Ks/TrKv-e-_nII/AAAAAAAAAVw/tGI-lY3mUNk/s1600/Xtend-farbig-800.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://1.bp.blogspot.com/-IaAh9poW8Ks/TrKv-e-_nII/AAAAAAAAAVw/tGI-lY3mUNk/s320/Xtend-farbig-800.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now I'm looking forward to my session about Xtend - which I'm very excited about. &lt;a href="http://www.eclipse.org/Xtext/#xtend2"&gt;Xtend&lt;/a&gt; is a programming language that is made for Java developers. With support for closures, extension methods or template expressions it allows to use some of the pending Java 8 features right now. In that sense it serves as a complement to the &lt;a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html"&gt;state of the art programming language&lt;/a&gt; - and integrates nicely with all the existing libraries and APIs. But first and foremost it's a real pleasure to write implementation code again, especially for scenarios where Java doesn't shine too bright. If you want to learn more about Xtend, please come to my &lt;a href="http://www.eclipsecon.org/europe2011/sessions/xtend-powerful-tool-everyday-programming"&gt;session&lt;/a&gt; in the &lt;b&gt;Theater Stage&lt;/b&gt; on Friday, &lt;b&gt;14:00&lt;/b&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-4908543676779130915?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/4908543676779130915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=4908543676779130915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4908543676779130915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4908543676779130915'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2011/11/xtend-eclipsecon-europe-2011.html' title='Xtend @ EclipseCon Europe 2011'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-IaAh9poW8Ks/TrKv-e-_nII/AAAAAAAAAVw/tGI-lY3mUNk/s72-c/Xtend-farbig-800.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-4604594126734748436</id><published>2011-06-19T22:27:00.000+02:00</published><updated>2011-06-19T22:27:30.697+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Customizing Content Assist with Xtext</title><content type='html'>As basically every part of &lt;a href="http://www.xtext.org"&gt;Eclipse Xtext&lt;/a&gt;, the content assist API provides a reasonable default behavior and is greatly customizable by means of dependency injection. This blog post demonstrates, how easy it is to create own completion proposals with this API.&lt;br /&gt;&lt;br /&gt;For the sake of simplicity, I'll use a grammar that fits in a single line:&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;Color: 'color' rgb=STRING;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;It allows to define exactly one color literal and the syntax is not really strict about the literal's format. Valid input files are considered to look like &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;color &lt;span style="color: blue;"&gt;"0,0,0"&lt;/span&gt;&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;color &lt;span style="color: blue;"&gt;"255,255,255"&lt;/span&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Now comes the fun part: The proposal list for the rgb string should provide some frequently used values, e.g. literals for black or white.&lt;br /&gt;&lt;br /&gt;Therefore I have to customize the proposal provider. Xtext already provides an empty stub implementation that will take the custom code. In order to change the proposals for the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;rgb&lt;/span&gt;-value in the parser rule &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Color&lt;/span&gt;, the method &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;completeColor_Rgb(..)&lt;/span&gt; has to be overridden. JDT's content assist or the quick outline in the proposal provider implementation helps to find all suitable entry points.&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;@Override&lt;br&gt;public void completeColor_Rgb(EObject model,&lt;br&gt;  Assignment assignment,&lt;br&gt;  ContentAssistContext context,&lt;br&gt;  ICompletionProposalAcceptor acceptor) {&lt;br&gt;    acceptor.accept(createCompletionProposal(&lt;br&gt;      "\"0,0,0\"", "black",&lt;br&gt;      null /*getBlackImage()*/, context));&lt;br&gt;    acceptor.accept(createCompletionProposal(&lt;br&gt;      "\"255,255,255\"", "white",&lt;br&gt;      null /*getWhiteImage()*/, context));&lt;br&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Two lines of code later, I can already insert literals for black or white:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Kx4FRjhRaxc/Tf5JsQyRsJI/AAAAAAAAAUM/SElBNkBQ-MM/s1600/Picture%2B23.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="104" width="222" src="http://3.bp.blogspot.com/-Kx4FRjhRaxc/Tf5JsQyRsJI/AAAAAAAAAUM/SElBNkBQ-MM/s400/Picture%2B23.png" /&gt;&lt;/a&gt;&lt;/div&gt;However, there are far more possibilities than simply creating plain vanilla proposals. The overloaded factory method &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;createCompletionProposal(..)&lt;/span&gt; returns an instance of the &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ConfigurableCompletionProposal&lt;/span&gt; which has a quite powerful API. It allows to change the appearance of the display string, I can set additional hover information, enable linked edit modes for the custom proposal or make it auto-insertable to name only a few. &lt;br /&gt;&lt;br /&gt;The next example uses an own &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ReplacementTextApplier&lt;/span&gt; to hook into the actual moment, when the proposal is applied:&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;@Override&lt;br&gt;public void completeColor_Rgb(EObject model,&lt;br&gt;  Assignment assignment,&lt;br&gt;  final ContentAssistContext context,&lt;br&gt;  ICompletionProposalAcceptor acceptor) {&lt;br&gt;  ConfigurableCompletionProposal pickColor =&lt;br &gt;    (~cast~) createCompletionProposal("Pick color...",&lt;br&gt;      context);&lt;br&gt;  if (pickColor != null) {&lt;br&gt;    pickColor.setTextApplier(&lt;br&gt;        new ReplacementTextApplier() {&lt;br&gt;      @Override&lt;br&gt;      public String getActualReplacementString(&lt;br&gt;        ConfigurableCompletionProposal proposal) {&lt;br&gt;        Display display = context.getViewer()&lt;br&gt;          .getTextWidget().getDisplay();&lt;br&gt;        ColorDialog colorDialog = new ColorDialog(&lt;br&gt;          display.getActiveShell());&lt;br&gt;        RGB newColor = colorDialog.open();&lt;br&gt;        return "\"" + newColor.red + "," + &lt;br&gt;          newColor.green + "," + &lt;br&gt;          newColor.blue + "\"";&lt;br&gt;      }&lt;br&gt;    });&lt;br&gt;    acceptor.accept(pickColor);&lt;br&gt;  }&lt;br&gt;  ..&lt;br&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;You'll guess that already from the code: This implementation allows to pick the color by means of a color chooser after the proposal has been selected, but see yourself:&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/25318717?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="400" height="200" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;There are plenty of other interesting APIs and services around the code completion in Xtext that are worthy of talking about (e.g. the prefix matcher, which Alex &lt;a href="http://blogs.itemis.de/stundzig/archives/766"&gt;covered in his recent post&lt;/a&gt;), but I'll leave them for another post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-4604594126734748436?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/4604594126734748436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=4604594126734748436' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4604594126734748436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4604594126734748436'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2011/06/customizing-content-assist-with-xtext.html' title='Customizing Content Assist with Xtext'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Kx4FRjhRaxc/Tf5JsQyRsJI/AAAAAAAAAUM/SElBNkBQ-MM/s72-c/Picture%2B23.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-1157149838933001782</id><published>2011-06-14T23:59:00.000+02:00</published><updated>2011-06-14T23:59:22.291+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Xdoc'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xdoc: A Documentation Language For Eclipse Frameworks</title><content type='html'>&lt;a href="https://github.com/RvonMassow/xDoc"&gt;Xdoc&lt;/a&gt; is a small markup language that allows to create code centric documentation in a very convenient way. The  documents can be rendered to HTML, to Eclipse Help files and to a printable PDF.&lt;br /&gt;Besides the usual markup tags to emphasize text, add images and tables or create structures such as chapters, sections and the like, there are two unique features of Xdoc that I want to highlight.&lt;br /&gt;&lt;br /&gt;First of all, it is possible to refer to Java types in a way that allows to statically validate these references. This feature comes very handy as soon as you want to describe important hooks of a framework or codebase. The references will be rendered as hyperlinks to the online Javadoc and if there is a public source repository, a second link points directly to the code.&lt;br /&gt;&lt;br /&gt;The second interesting feature is related to code snippets in the documentation. It is often valuable to document some usage patterns for a certain class or interface by example. However, making these snippets easy to read and achieving the familiar look of an Eclipse editor with syntax coloring and the like often requires a lot of effort. Xdoc simplifies this greatly. You just define a set of keywords for a language and the renderer will take care of the highlighting for your code snippets in a consistent manner. This is a big improvement when it comes to the appearance of your help files.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/25103644?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="401" height="266" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;To provide just a few technical details: Xdoc was build with &lt;a href="http://www.eclipse.org/Xtext"&gt;Xtext&lt;/a&gt;. That is, the Eclipse editor supports all the nice features that you are already familiar with from other editors. The code generator which creates the Eclipse Help files on the fly is written in &lt;a href="http://blog.efftinge.de/2011/04/eclipse-xtend-beta-available.html"&gt;Xtend&lt;/a&gt; which in turn is implemented on top of Xtext 2.0. Xdoc itself was used to write the Eclipse Help for Xtext and Xtend. Actually, the Xtend Help was written before Xtend was implemented, but that's another story. The chicken or the egg? Things get a little blurry these days... Did I mention that Xtext was used to implement Xtext?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-1157149838933001782?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/1157149838933001782/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=1157149838933001782' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/1157149838933001782'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/1157149838933001782'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2011/06/xdoc-documentation-language-for-eclipse.html' title='Xdoc: A Documentation Language For Eclipse Frameworks'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-6861264540799009370</id><published>2011-06-07T23:46:00.001+02:00</published><updated>2011-06-07T23:47:38.461+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>New Features In The Xtext Grammar Editor</title><content type='html'>Besides the huge new features like the &lt;a href="http://blog.efftinge.de/2010/09/xbase-new-programming-language.html"&gt;Xbase&lt;/a&gt; library, the new &lt;a href="http://blog.efftinge.de/2011/04/eclipse-xtend-beta-available.html"&gt;Xtend&lt;/a&gt; and the cross language &lt;a href="http://koehnlein.blogspot.com/2011/06/rename-refactoring-in-xtext-20.html"&gt;refactoring&lt;/a&gt; capabilities, we made sure that we still find some time to implement small refinements and improvements in &lt;a href="http://www.xtext.org"&gt;Xtext's&lt;/a&gt; core. Some of them may be not too obvious but I'm pretty sure they will actually have some impact on the overall user experience when building new languages with the framework. This blog post is about two nice additions in the grammar editor that are available in Xtext 2.0 with Eclipse Indigo.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Improved content assist&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You'll often want to create a concrete syntax for an existing EPackage which was somewhat cumbersome in the past since it involved copy and paste of the namespace uri. The good news is:&lt;br /&gt;Adding imported packages was greatly simplified. It's now far easier to find the actual EPackage that you want to use in your grammar because content assist matches for the more selective last segments of the namespace uri, too:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/24795437?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="401" height="223" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Speaking about imported packages: If you want to override a rule from another grammar, you can now use content assist to create a stub for that. The editor will take care of necessary import clauses:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/24795484?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="401" height="223" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Quick Fixes &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If your workflow is similar to mine, you'll usually develop a grammar top-down. This implies that your grammar often contains a bunch of unresolved rule calls since the invocation of a parser rule appears before the rule itself is written. A new quick fix allows to create stubs for unknown rules as soon as you refer to a rule which does not yet exist:&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/24795514?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="401" height="223" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;I hope you like these small improvements as much as I do!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-6861264540799009370?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/6861264540799009370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=6861264540799009370' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6861264540799009370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6861264540799009370'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2011/06/new-in-xtext-grammar-editor.html' title='New Features In The Xtext Grammar Editor'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-9053142158196457033</id><published>2011-02-28T09:33:00.001+01:00</published><updated>2011-02-28T13:52:05.624+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtend2 - What's In The Pipeline?</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the last weeks, the &lt;a class="vt-p" href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt; team has been busy with creating Xtend2.&amp;nbsp;Xtend2 is the successor for Xtend and Xpand and implemented on top of&amp;nbsp;&lt;a class="vt-p" href="http://blog.efftinge.de/2010/09/xbase-new-programming-language.html"&gt;Xbase&lt;/a&gt;&lt;sup&gt;1&lt;/sup&gt;. I think we made really great progress both within Xbase - which is a reusable expression language that can be embedded into any language that is developed with Xtext - and with Xtend2 itself.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a class="vt-p" href="https://lh4.googleusercontent.com/-HbYHJCo1EgQ/TWqLhaFgqTI/AAAAAAAAATw/9H_yHwGPQ2M/s1600/xtend2-overview.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="371" src="https://lh4.googleusercontent.com/-HbYHJCo1EgQ/TWqLhaFgqTI/AAAAAAAAATw/9H_yHwGPQ2M/s400/xtend2-overview.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Xtend2 provides some unique language features and great Eclipse based tooling. It's really a pleasure to see how the well choosen orthogonal concepts interact with each other and how their total creates a language that feels as fantastic as &lt;a class="vt-p" href="http://blog.efftinge.de/2010/12/xtend-2-successor-to-xpand.html"&gt;Sven predicted&lt;/a&gt;.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin: 0px; text-align: left;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The &lt;b&gt;extension concept &lt;/b&gt;of Xtend2 allows to import extension methods in a static and in a dynamic manner. Dynamically imported extensions are injected into your instances by means of dependency injection. It is really straight forward to create a customizable and adoptable code generator simply be using well defined components that are assembled by a DI container such as Google &lt;a class="vt-p" href="http://code.google.com/p/google-guice/"&gt;Guice&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Polymorphic dispatching&lt;/b&gt;&amp;nbsp;allows to invoke overloaded methods according to the runtime type of their arguments instead of a static decision. This is especially useful if you want to process heterogenous data structures such as EMF models. It is even possible to rely on this runtime binding when you use Xtend2 classes from Java code.&lt;/li&gt;&lt;li&gt;Even though Xtend2 compiles to java code which is not dependent on JDK7 (or later), we provide full support for &lt;b&gt;closures&lt;/b&gt;. Writing own&amp;nbsp;&lt;b&gt;higher order functions&lt;/b&gt; that take closures as arguments or return function types is possible, too.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Type inference&lt;/b&gt; works for expression trees and across method boundaries. It is usually not necessary to define the type of closure parameters, local variables or the return type of methods since the type system will derive it automagically. It works great with &lt;b&gt;generics&lt;/b&gt;, too.&lt;/li&gt;&lt;li&gt;Xtend2's &lt;b&gt;rich strings&lt;/b&gt; allow to write code generator easily. We came up with a neat solution for the classical whitespace problem in template languages. The IDE support that includes validation of template indentation, quick fixes and semantic highlighting helps to write code generators or compilers in a readable way while the output looks nice, too.&lt;/li&gt;&lt;li&gt;While we're at &lt;b&gt;IDE support&lt;/b&gt;, did I mention the refactoring capabilities, content assist, hover information or the other features that are available in the Xtend2 editor because?&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a class="vt-p" href="http://www.eclipsecon.org/2011/static/image/image2011/web_header_logo_2011.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="93" src="http://www.eclipsecon.org/2011/static/image/image2011/web_header_logo_2011.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin: 0px; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin: 0px; text-align: left;"&gt;If you are at &lt;a class="vt-p" href="http://www.eclipsecon.org/2011/"&gt;EclipseCon&lt;/a&gt; and as eager to get your hands dirty with Xtend2 as I am, make sure to attend the &lt;a class="vt-p" href="http://www.eclipsecon.org/2011/sessions/?page=sessions&amp;amp;id=2053"&gt;tutorial&lt;/a&gt; that &lt;a class="vt-p" href="http://koehnlein.blogspot.com/"&gt;Jan&lt;/a&gt;, &lt;a class="vt-p" href="http://blog.efftinge.de/"&gt;Sven&lt;/a&gt; and I will give there.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;[1] The Xbase development is sponsored by itemis and the Federal Ministry of Education and Research.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; margin: 0px; text-align: left;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-9053142158196457033?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/9053142158196457033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=9053142158196457033' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/9053142158196457033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/9053142158196457033'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2011/02/xtend2-whats-in-pipeline.html' title='Xtend2 - What&apos;s In The Pipeline?'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh4.googleusercontent.com/-HbYHJCo1EgQ/TWqLhaFgqTI/AAAAAAAAATw/9H_yHwGPQ2M/s72-c/xtend2-overview.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-2735058393107464222</id><published>2010-10-31T00:00:00.006+02:00</published><updated>2010-11-01T10:23:28.809+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title type='text'>My Eclipse Summit Europe 2010</title><content type='html'>This years &lt;a href="http://www.eclipsecon.org/summiteurope2010/"&gt;Eclipse Summit&lt;/a&gt; in Ludwigsburg is around the corner and I'm eagerly looking forward to it: The program promises to be interesting and a conference is always a great opportunity to meet nice people - especially if they owe me a beer :-)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.eclipsecon.org/summiteurope2010/table/static/image/skin/conference-header-icon.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.eclipsecon.org/summiteurope2010/table/static/image/skin/conference-header-icon.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/_OvMG_klGAe8/TM2ytSfeHuI/AAAAAAAAASw/Kxc5vvKVAsg/s1600/sponsor.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;/a&gt;Sven and I will give a &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1754"&gt;live demo&lt;/a&gt; on the development of an &lt;a href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt; based CSS editor that leverages the expressivness of &lt;a href="http://blog.efftinge.de/2010/09/xbase-new-programming-language.html"&gt;Xbase&lt;/a&gt;. You'll see how easy it is to create behavioral languages with Xbase. It was really a pleasure to prepare the demo and I think we have something awesome in the pipeline. Make sure that you attend our session on Thursday, 11:30 am. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_OvMG_klGAe8/TM2yuIM6f2I/AAAAAAAAAS0/7AezQdiyE3I/s1600/xbase.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" src="http://2.bp.blogspot.com/_OvMG_klGAe8/TM2yuIM6f2I/AAAAAAAAAS0/7AezQdiyE3I/s320/xbase.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;However, the conference starts on Tuesday so first things first: The first item on my personal conference schedule is the &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions/?page=sessions&amp;amp;id=1833"&gt;tutorial on Android development&lt;/a&gt; powered by Eclipse Modeling. &lt;a href="http://koehnlein.blogspot.com/"&gt;Jan&lt;/a&gt;, &lt;a href="https://www.xing.com/profile/Holger_Schill2;key=0.0"&gt;Holger&lt;/a&gt; and &lt;a href="https://www.xing.com/profile/Dennis_Huebner2"&gt;Dennis&lt;/a&gt; will help you to create a language with Xtext to model your first Android app. A team from Obeo will assist you in the second part of the tutorial with &lt;a href="http://www.eclipse.org/acceleo/"&gt;Acceleo&lt;/a&gt; to actually generate the application from your model. Tuesday afternoon is symposia time. I'll attend the modeling symposium which promises to hold some interesting lightning demos and discussions. There, I will show how to integrate models with existing Java code by means of the JVM Types Ecore model.&lt;br /&gt;&lt;br /&gt;On Wednesday, Sven will give a &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions/?page=sessions&amp;amp;id=1753"&gt;talk about dependency injection&lt;/a&gt; and I'd advise every developer who does not yet use and breath DI to attend this session as it's about a really a great programming model. After you've been &lt;strike&gt;inj&lt;/strike&gt;infected you'll not want to miss it - especially if you use Google's DI framework &lt;a href="http://code.google.com/p/google-guice/"&gt;Guice&lt;/a&gt;. Furthermore I'm looking forward to the sessions on &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1658"&gt;GIT&lt;/a&gt;, &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1923"&gt;B3&lt;/a&gt; or the &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1693"&gt;Code Recommenders project&lt;/a&gt;. I think they cover exciting technologies and projects.&lt;br /&gt;&lt;br /&gt;Besides my own &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1754"&gt;session&lt;/a&gt; on Thursday I can recommend &lt;a href="http://heikobehrens.net/"&gt;Heiko&lt;/a&gt;'s and &lt;a href="http://www.peterfriese.de/"&gt;Peter&lt;/a&gt;'s talk about &lt;a href="http://www.eclipsecon.org/summiteurope2010/sessions?id=1733"&gt;mobile development with Eclipse Modeling&lt;/a&gt;. I've heard this talk (or a slightly other version of it) before and it's entertaining and technically interesting.&lt;br /&gt;&lt;br /&gt;Altogether, the odds are good that it's going to be a great conference. So in case you are one of the lucky guys who registered in time for this years ESE: See you there!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-2735058393107464222?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/2735058393107464222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=2735058393107464222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/2735058393107464222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/2735058393107464222'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/10/my-eclipse-summit-europe-2010.html' title='My Eclipse Summit Europe 2010'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_OvMG_klGAe8/TM2yuIM6f2I/AAAAAAAAAS0/7AezQdiyE3I/s72-c/xbase.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-3879636950374995509</id><published>2010-08-29T22:22:00.002+02:00</published><updated>2010-08-29T22:25:31.200+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Fun with Xtext: Language Mixins</title><content type='html'>There are rumors that &lt;a href="http://www.xtext.org"&gt;Xtext&lt;/a&gt; does only have rudimentary support for language libraries or language reuse and does not allow to create 'advanced stuff'. And it is actually true, that Xtext has only first class support for extending only one other language. But with some creativity and customizing, it is easily possible to create really nice editors for intermixed languages. I've produced a small screencast that demonstrates how an editor for template proposals (read: a template language) may look like when it's aware of your target syntax.&lt;br /&gt;&lt;br /&gt;&lt;iframe src="http://player.vimeo.com/video/14527846?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=FFFFFF" width="400" height="300" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Besides the smart editor for template proposals there is another interesting feature in this screencast: As template proposals are usually edited on a preference page, I implemented a small prototype that shows how a form field may leverage the features of a full blown Xtext editor.&lt;br /&gt;&lt;br /&gt;Both prototypic implementations are only based on Xtext 1.0 APIs and not yet publicly available. But I'ld assume that at least parts of them will be moved into the Xtext Indigo stream. Stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-3879636950374995509?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/3879636950374995509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=3879636950374995509' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3879636950374995509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3879636950374995509'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/08/language-mixins-with-xtext.html' title='Fun with Xtext: Language Mixins'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-6931320921129283599</id><published>2010-08-14T14:55:00.017+02:00</published><updated>2010-08-14T15:28:31.070+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>How to Reduce Memory Consumption of the Xtext Builder?</title><content type='html'>As the &lt;a href="http://blog.efftinge.de/2010/01/xtexts-new-builder-infrastructure.html"&gt;Xtext builder&lt;/a&gt; loads every affected resource into a single resource set to update its cached state and validate the changes, it tends to require a &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=307665"&gt;huge amount of memory&lt;/a&gt; for a clean build of a really large project. If there are thousands of files involved it may happen that the machine simply runs out of available physical memory. As a side-effect performance degraded significantly due to paging and the vm crashed with an OutOfMemoryError.&lt;br /&gt;&lt;br /&gt;During the past weeks we worked hard to fix this for &lt;a href="http://www.xtext.org"&gt;Xtext&lt;/a&gt; SR1 which is due end of August. And the good news is - we could tackle the problem at its root. Finally we were able to build huge projects with a reasonable heap size that previously refused to build with 8Gb++.&lt;br /&gt;&lt;br /&gt;The solution was a (more or less) simple divide and conquer algorithm: We split the job into two well defined phases and clustered each phase. This enables the builder to release memory early and thereby drastically reduce the peak amount of required heap.&lt;br /&gt;&lt;br /&gt;To enable the clustering Xtext builder in your IDE, you have to override some central functionality that drives the builder for every language in your running IDE. Simply add an extension to your ui plugin that overrides the common configuration.&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;&amp;lt;extension point=&lt;br/&gt; "o.e.x.ui.shared.overridingGuiceModule"&amp;gt;&lt;br/&gt;    &amp;lt;module class=&lt;br/&gt; "..builder.clustering.ClusteringModule"/&amp;gt;&lt;br/&gt;&amp;lt;/extension&amp;gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;The second step is to override a binding in the ui module of your language to be communicate with the clustered builder. This implies that each Xtext based language that is installed in the IDE, has to expect the clustering builder instead of the default implementation. Otherwise you'll be confronted with an exception due to incompatible settings. The bindind in your ui module replaces the component that is used by the &lt;a href="http://www.eclipse.org/Xtext/documentation/1_0_0/xtext.html#scoping"&gt;scope provider&lt;/a&gt; in the builder context:&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;@Override&lt;br/&gt;public void&lt;br/&gt;  configureIResourceDescriptionsBuilderScope(&lt;br/&gt;        Binder binder) {&lt;br/&gt;  binder.bind(IResourceDescriptions.class)&lt;br/&gt;    .annotatedWith(&lt;br/&gt;      Names.named(AbstractGlobalScopeProvider&lt;br/&gt;                       .NAMED_BUILDER_SCOPE))&lt;br/&gt;    .to(CurrentDescriptions.ResourceSetAware&lt;br/&gt;                                     .class);&lt;br/&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Besides this global change to reduce the memory consumption, you may want to optimize some language specific implementations. It is always a good idea to review the number of &lt;a href="http://www.eclipse.org/Xtext/documentation/1_0_0/xtext.html#resourcedescriptions"&gt;exported objects&lt;/a&gt;. There is usually no need to export any object that has a name. E.g. a local variably is only reachable from inside the resource, it can simply be skipped when the exported objects are computed. Another good candidate is the &lt;a href="http://www.eclipse.org/Xtext/documentation/1_0_0/xtext.html#fragmentProvider"&gt;fragment provider&lt;/a&gt;. The default fragments for resources are quite generic and somehow verbose. It will not hurt if you can come up with a shorter, resource specific representation. Both customization points will usually not only make your language consume less memory but even have potential to improve the performance as well because you can use language specific information in your implementation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-6931320921129283599?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/6931320921129283599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=6931320921129283599' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6931320921129283599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6931320921129283599'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/08/how-to-reduce-memory-consumption-of.html' title='How to Reduce Memory Consumption of the Xtext Builder?'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-6240043114716316123</id><published>2010-06-22T23:16:00.005+02:00</published><updated>2010-06-22T23:23:32.910+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>How to Deploy Xtext to a Headless Plain-Java Environment?</title><content type='html'>Yesterday, &lt;a href="http://blog.efftinge.de/"&gt;Sven&lt;/a&gt; and I were at the &lt;a href="http://wiki.eclipse.org/Eclipse_DemoCamps_Helios_2010/Hanover"&gt;Eclipse Democamp in Hannover&lt;/a&gt; which was organized by &lt;a href="http://www.brox.de/"&gt;brox IT-Solutions&lt;/a&gt; and &lt;a href="http://www.bredex.de/"&gt;Bredex&lt;/a&gt; - thanks for the nice event. I met interesting people and we discussed various topics. One particular question about &lt;a href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt; was raised several times from different sides: How do I use my language in an environment without Eclipse, e.g. on a build server? As this was already possible from the first minute even with the former oAW version of Xtext and with Xtext 0.7.0, too, I was kind of suprised. In fact, any execution of the generator workflow uses Xtext in a standalone environment - without OSGi, Equinox or any dependency on Eclipse UI. The problem seems to be another one: How can I determine all the required libraries to deploy my Xtext-driven generator?&lt;br /&gt;&lt;br /&gt;It turns out that this task is suprisingly easy with Eclipse. We'll use a minor trick to simplify the necessary steps. First of all, we have to create a new Run Configuration for a Java Application. Actually this one will never be executed, but we need to refer to this one in the next step. Just create a new configuration for your generator-project and use the &lt;i&gt;org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher&lt;/i&gt; as the main class:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OvMG_klGAe8/TCEjJrJ-AsI/AAAAAAAAASQ/PopZgK5yP0Y/s1600/new_run_config.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OvMG_klGAe8/TCEjJrJ-AsI/AAAAAAAAASQ/PopZgK5yP0Y/s320/new_run_config.png" /&gt;&lt;/a&gt;&lt;/div&gt;Now that we have a run configuration for the generator project, let's export the project as a runnable jar. Choose &lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Export... -&amp;gt; Runnable JAR file&lt;/span&gt;&lt;/span&gt; from the context menu of the generator project. The wizard will ask for a launch configuration and that's where we use the one that we created a second ago:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_OvMG_klGAe8/TCEjK3TKFuI/AAAAAAAAASY/bSHEyACde8s/s1600/export_runnable_jar.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_OvMG_klGAe8/TCEjK3TKFuI/AAAAAAAAASY/bSHEyACde8s/s320/export_runnable_jar.png" /&gt;&lt;/a&gt;&lt;/div&gt;Select the options of your choice, point to a target file and hit the Finish-button. Eclipse will collect required libraries and add the necessary entries to the &lt;i&gt;MANIFEST.MF&lt;/i&gt; in the runnable JAR file. As I already said, it's suprisingly simple.&lt;br /&gt;&lt;br /&gt;Last but not least, I recommend to create a batch file or shell script that starts a virtual machine, points to the exported archive and refers to the module name of the generator workflow, e.g.:&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;java -jar exported.jar workflow.MyDslGenerator&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;It's probably a good idea to wrap the invocation of the Mwe2Launcher in a custom main class to encapsulate the name of the generator workflow and pass additional arguments to the workflow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-6240043114716316123?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/6240043114716316123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=6240043114716316123' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6240043114716316123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6240043114716316123'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/06/how-to-deploy-xtext-standalone.html' title='How to Deploy Xtext to a Headless Plain-Java Environment?'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_OvMG_klGAe8/TCEjJrJ-AsI/AAAAAAAAASQ/PopZgK5yP0Y/s72-c/new_run_config.png' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-5635070185946067261</id><published>2010-06-20T14:20:00.001+02:00</published><updated>2010-06-20T14:23:27.227+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Helios'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>New In Xtext: Case Insensitive Languages</title><content type='html'>A quick glimpse at the &lt;a href="http://www.eclipse.org/Xtext/documentation/helios/new_and_noteworthy.php"&gt;New and Noteworthy&lt;/a&gt; features of &lt;a href="http://www.xtext.org"&gt;Xtext 1.0&lt;/a&gt; reveals that the framework allows to develop languages that are case insensitive. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.eclipse.org/Xtext/documentation/helios/images/IgnoreCase2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://www.eclipse.org/Xtext/documentation/helios/images/IgnoreCase2.png" /&gt;&lt;/a&gt;&lt;/div&gt;To mark upper and lower cases meaningless for keywords or cross references, you just have to replace two default fragments in the MWE2 workflow, add an option and hit the Run button:&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;..&lt;br/&gt;fragment = AntlrGeneratorFragment {&lt;br/&gt;  options = {&lt;br/&gt;    // ignore case keywords&lt;br/&gt;    ignoreCase = true&lt;br/&gt;  }&lt;br/&gt;}&lt;br/&gt;..&lt;br/&gt;fragment =&lt;br/&gt;   scoping.ImportNamespacesScopingFragment {&lt;br/&gt;  // ignore case cross references&lt;br/&gt;  ignoreCase = true&lt;br/&gt;}&lt;br/&gt;..&lt;br/&gt;fragment =&lt;br/&gt;      ContentAssistParserGeneratorFragment {&lt;br/&gt;  options = {&lt;br/&gt;    // ignore case keywords&lt;br/&gt;    ignoreCase = true&lt;br/&gt;  }&lt;br/&gt;}&lt;br/&gt;..&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;The &lt;i&gt;o.e.x.g.parser.antlr.ex.rt.AntlrGeneratorFragment&lt;/i&gt; and &lt;i&gt;o.e.x.g.parser.antlr.ex.ca.ContentAssistParserGeneratorFragment&lt;/i&gt; replace the two fragments, that are configured by default: &lt;i&gt;o.e.x.g.parser.antlr.XtextAntlrGeneratorFragment&lt;/i&gt; and &lt;i&gt;o.e.x.g.parser.antlr.XtextAntlrUiGeneratorFragment&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Xtext provides an API that allows to define custom, local scopes that are ignore case as well. Have a look at the utility class &lt;i&gt;o.e.x.resource.ignorecase.IgnoreCaseScopes&lt;/i&gt; to learn more about it. The configured generator fragments will take care of the rest, e.g. the default bindings for the global scopes, the parser and the serializer.&lt;br /&gt;&lt;br /&gt;As you can see it is possible to define case insensitivity independently for keywords and cross-links. And if you want to keep your workflow short and concise instead of adding this flag for each and every fragment that accepts this option, you are free to introduce a new property and use this one directly or via the &lt;i&gt;auto-inject&lt;/i&gt; option. Please refer to the updated &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tmf/org.eclipse.xtext/plugins/org.eclipse.xtext.doc/html/xtext.html?root=Modeling_Project&amp;revision=1.45#MWE2"&gt;documentation&lt;/a&gt; if you want to learn more about the MWE2 language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-5635070185946067261?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/5635070185946067261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=5635070185946067261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5635070185946067261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5635070185946067261'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/06/new-in-xtext-case-insensitive-languages.html' title='New In Xtext: Case Insensitive Languages'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-6671382920262552288</id><published>2010-06-17T20:30:00.003+02:00</published><updated>2010-06-17T20:49:53.930+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Helios'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Customizing Error Messages in Xtext 1.0</title><content type='html'>As the Eclipse &lt;a href="http://eclipse.org/helios/"&gt;Helios&lt;/a&gt; Release is around the corner I'll use the chance to describe some nice odds and ends in &lt;a href="http://www.xtext.org"&gt;Xtext&lt;/a&gt; 1.0. One of which is a newly introduced API that allows to customize the default messages for parse errors and linking diagnostics.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_OvMG_klGAe8/TBplPRka_KI/AAAAAAAAASE/ubnVwJxLSLU/s1600/error_messages.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_OvMG_klGAe8/TBplPRka_KI/AAAAAAAAASE/ubnVwJxLSLU/s320/error_messages.png" /&gt;&lt;/a&gt;&lt;/div&gt;If you try to read erroneous models, you'll get annotations for syntax errors and linking problems in the editor by default. These error messages are not always the most meaningful ones from a user's point of view. Furthermore it was not possible to i18n them. This was changed with Xtext 1.0 by means of two newly introduced customization hooks.&lt;br /&gt;&lt;br /&gt;Users who want to alter the default messages that the parser produces may implement a so called ISyntaxErrorMessageProvider which allows to change the wording of syntax errors and messages from the value converter.&lt;br /&gt;&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;interface ISyntaxErrorMessageProvider {&lt;br /&gt; SyntaxErrorMessage getSyntaxErrorMessage(&lt;br/&gt;      IParserErrorContext context);&lt;br /&gt; SyntaxErrorMessage getSyntaxErrorMessage(&lt;br/&gt;      IValueConverterErrorContext context);&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;The implementor has the current state of the parser at hand to produce a meaningful message for the user. Basically any information is available to compute the SyntaxErrorMessage. She is free to use the intermediate semantic model, the attached node model that reflects the parsed tokens, or the really low level stream that the parser works with. &lt;br /&gt;&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;interface IErrorContext {&lt;br /&gt; String getDefaultMessage();&lt;br /&gt; EObject getCurrentContext();&lt;br /&gt; AbstractNode getCurrentNode();&lt;br /&gt;}&lt;br /&gt;interface IParserErrorContext&lt;br/&gt;                     extends IErrorContext {&lt;br /&gt; RecognitionException&lt;br/&gt;                   getRecognitionException();&lt;br /&gt; String[] getTokenNames();&lt;br /&gt;}&lt;br /&gt;interface IValueConverterErrorContext&lt;br/&gt;                     extends IErrorContext {&lt;br /&gt; ValueConverterException&lt;br/&gt;                getValueConverterException();&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Especially handy is the option to assign an issue code to a syntax error message. This is the constant that a quick fix refers to, to solve your models syntactic problems easily. Assuming you evolve the syntax of your language, you may want to define such quick fixes that migrate old files to the new notation. Of course there are more use cases such as mandatory keyword sequences at the end of an element.&lt;br /&gt;&lt;br /&gt;There is another component that produces default error messages: If the linker cannot resolve an EMF proxy when navigating a cross reference, it will create an error diagnostic, too. We used the same pattern to allow clients to customize this message.&lt;br /&gt;&lt;br /&gt;&lt;textarea class="java" name="code"&gt;&lt;br /&gt;interface ILinkingDiagnosticMessageProvider{&lt;br /&gt; DiagnosticMessage getUnresolvedProxyMessage(&lt;br/&gt;      ILinkingDiagnosticContext context);&lt;br /&gt;}&lt;br /&gt;interface ILinkingDiagnosticContext {&lt;br /&gt; EObject getContext();&lt;br /&gt; EReference getReference();&lt;br /&gt; String getLinkText();&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Again, every piece of information is available in the context, that is passed to the message provider and of course it is possible to assign an issue code to the linking diagnostic. Even more, clients may choose to reduce the severity of the linking problem to a warning. Languages that support a kind of dynamic invoke like C# may establish real links for the statically bound features but ignore unresolved references for dynamic parts.&lt;br /&gt;&lt;br /&gt;Both APIs may come quite handy if you want to i18n your applicaton or tailor the error messages that are presented to the user.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-6671382920262552288?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/6671382920262552288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=6671382920262552288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6671382920262552288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/6671382920262552288'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/06/customizing-error-messages-in-xtext-10.html' title='Customizing Error Messages in Xtext 1.0'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_OvMG_klGAe8/TBplPRka_KI/AAAAAAAAASE/ubnVwJxLSLU/s72-c/error_messages.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-7416032838842693598</id><published>2010-04-01T16:02:00.000+02:00</published><updated>2010-04-01T16:02:15.761+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>EclipseCon 2010 - A Review</title><content type='html'>This year was the first time that I attended the &lt;a href="http://www.eclipsecon.org/2010/"&gt;EclipseCon&lt;/a&gt; in Santa Clara and it was a really great event. However, the very first nice impression had actually nothing to do with the EclipseCon itself but with the nice weather in California. As the journey started in the rainy northern Germany, it was very pleasing to arrive in San Francisco with nearly 70F. To fight the jet lag back we rent some bikes and explored the vicinity on Sundays. It was a very enjoyable trip through the Bay Area. Nevertheless the night was rather short for me.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EclipseCon 2010&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The first session on Monday morning was the &lt;a href="http://www.eclipsecon.org/2010/sessions?id=1191"&gt;Xtext meets e4&lt;/a&gt;&amp;nbsp;tutorial. It was especially interesting for me because &lt;a href="http://twitter.com/jankoehnlein"&gt;Jan&lt;/a&gt;, &lt;a href="http://twitter.com/docfx"&gt;Moritz&lt;/a&gt; and &lt;a href="http://twitter.com/hbehrens"&gt;Heiko&lt;/a&gt; demonstrated a more user friendly approach to workbench modeling than editing tree editors and property sheets. I hope that at least some parts of the textual approach to store workbench information will make it into e4 as I personally do not like working with xmi-based persistence and form editors. However, up to now nobody wanted to jump in and shape up the prototypic Xtext editor.&amp;nbsp;&lt;i&gt;Hint, hint!&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;The next session was about &lt;a href="http://www.eclipsecon.org/2010/sessions?id=1315"&gt;The Twenty Modeling Things&lt;/a&gt;. &lt;a href="http://kenn-hussey.blogspot.com/"&gt;Kenn&lt;/a&gt; and &lt;a href="https://www.xing.com/profile/Stephan_Eberle"&gt;Stephan&lt;/a&gt; talked basically about some missing pieces in the Eclipse Modeling Project that will be covered by the &lt;a href="http://www.eclipse.org/proposals/sphinx/"&gt;Sphinx proposal &lt;/a&gt;and showed some of the IDE concepts that will be available. Afterwards I wanted to learn something about &lt;a href="http://www.eclipse.org/modeling/emft/b3/"&gt;B3&lt;/a&gt; from &lt;a href="http://eclipse-buckminster.blogspot.com/"&gt;Henrik&lt;/a&gt;, but unfortunately the room was totally overcrowded. People seem to be aware of the fact, that automated builds that work the same way on the integration server as in the local Eclipse workspace are crucial to reliability and testability. Because building has been kind of a pain point for us in the past, I am especially happy about the new&amp;nbsp;&lt;a href="http://www.eclipse.org/buckminster/"&gt;Buckminster&lt;/a&gt; build for Xtext on the Athena server, that &lt;a href="http://thhal.blogspot.com/"&gt;Thomas&lt;/a&gt; set up last week.&lt;br /&gt;&lt;br /&gt;On Tuesday, &lt;a href="http://blog.efftinge.de/"&gt;Sven&lt;/a&gt; and I presented some the new and especially the noteworthy things in &lt;a href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt;. It is always fun to &lt;a href="http://www.eclipsecon.org/2010/sessions/?page=sessions&amp;amp;id=1148"&gt;talk&lt;/a&gt; about the &lt;a href="http://www.eclipse.org/Xtext/documentation/helios/new_and_noteworthy.php"&gt;things&lt;/a&gt; that we have been busy with in the past months. The next event for modeling enthusiasts was the &lt;a href="http://www.eclipsecon.org/2010/sessions?id=1278"&gt;Modeling Runway&lt;/a&gt;. Although there were some technical ... inconveniences at the beginning, they turned into entertainment when Kenn advanced the slides or Sven's Xtext fast forward demo.&lt;br /&gt;&lt;br /&gt;Wednesday was the day of &lt;a href="http://ianskerrett.wordpress.com/2010/03/25/best-keynote-ever/"&gt;THE&lt;/a&gt; &lt;a href="http://www.eclipsecon.org/2010/sessions?id=1600"&gt;keynote&lt;/a&gt;. Jeff Norris from the NASA played with all those things that boys dream of - and most likely still do as men. He remote controlled an 8 feet robot on the NASA area. It requires a lot of confidence in the software that you built when you perform those things live on stage. In the afternoon I gave my lightning talk about the &lt;a href="http://www.eclipsecon.org/2010/sessions?id=1172"&gt;new MWE&lt;/a&gt;&amp;nbsp;tooling&amp;nbsp;based on Xtext and a runtime layer that got an ultra slim diet.&lt;br /&gt;The BoF about IDE tooling for the e4 development model was the last session on Wednesday. It was quite interesting and insightful to discuss the various ideas and approaches towards a steeper learning curve when developing plugins for e4. Tonny summarized the results in his &lt;a href="http://blog.rcp-company.com/2010/03/dependency-injection-in-e4-revised.html"&gt;blog&lt;/a&gt; and created or commented a few bugzillas that reflect the ideas.&lt;br /&gt;&lt;br /&gt;Thursday went by as fast as it came. It was a day of some short discussions and I used the chance to do session hopping and hear something about basically everything in parallel. In the late afternoon, we returned the bikes and had a Mexican dinner before the traditional European Reception took place.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Although I expected the EclipseCon to take place in the Convention Center, I think it was a good decision to use the conference rooms in the Hyatt Hotel instead. Unfortunately they were a little too small for some of the talks and too low-ceiling so the canvas was probably not fully visible from the rows in the back. However, this minor drawback was fully compensated by the &lt;b&gt;nice atmosphere&lt;/b&gt; during the conference. People ran literally into each other anytime and there were plenty of opportunities to chat about various topics. It was &lt;b&gt;really easy to get in touch&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;What I personally took along was that the development of &lt;b&gt;custom language support is becoming&lt;/b&gt; kind of &lt;b&gt;mainstream&lt;/b&gt;. It seems to me that people have learned that XML is not the best way to store human readable and editable information. The Xtext framework provides the necessary abstractions to easily develop the infrastructure to parse, process and edit files in a very convenient way. Projects like B3, EMF Query or AMP already adopted Xtext to provide tooling for programming or configuration languages and others decided after in-depth discussions that this might be a approach worthwhile to explore. Many people came to the &lt;a href="http://www.itemis.com/"&gt;itemis&lt;/a&gt; booth to talk about their proprietary solutions and we &lt;b&gt;sketched many ideas&lt;/b&gt; on how to supersede existing implementations with EMF and Xtext. It was great fun to feel the vibes around Xtext.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-7416032838842693598?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/7416032838842693598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=7416032838842693598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/7416032838842693598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/7416032838842693598'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/04/eclipsecon-2010-review.html' title='EclipseCon 2010 - A Review'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-1570816806791451157</id><published>2010-01-12T11:28:00.006+01:00</published><updated>2010-01-12T17:48:28.182+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MWE'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>A sneak peek at the new MWE editor</title><content type='html'>The &lt;a href="http://wiki.eclipse.org/Modeling_Workflow_Engine_%28MWE%29"&gt;Modeling Workflow Engine&lt;/a&gt; (MWE) basically allows to assemble and orchestrate Java objects to use the resulting instances. A major use case is the composition of different &lt;a href="http://www.eclipse.org/modeling/"&gt;Eclipse Modeling&lt;/a&gt; components to create an automated workflow for model based development approaches. Model readers, tranformation and validation engines or code generators can be plugged together to create a complete chain from the edited model to a runnable application or at least a bunch of refinable source code. It is even possible to use MWE in your own application to configure it externally.&lt;br /&gt;&lt;br /&gt;One drawback of the current version of MWE is the lack of tool support when you have to edit the workflow configuration files. Although the XML dialect is quite optimized and even the simple XML editor helps a lot with support for paired tags, syntax validation and highlighting, it does not provide more sophicated features like MWE specific content assist, constraint checking or navigation.&lt;br /&gt;&lt;br /&gt;Therefore, improved tooling is a major item on the roadmap to MWE 0.8.0 which will be part of the Eclipse Helios release. We currently discuss a refinement of the syntax for workflow files. It should be more concise and we want to provide a state of the art editor with advanced features. That's why we created a first prototype for a new MWE language at the end of the last year based on the &lt;a href="http://www.xtext.org"&gt;Xtext&lt;/a&gt; framework.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Support for externalized properties&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="468" height="386"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8690190&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=8690190&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="468" height="386"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;MWE files allow users to externalize configuration values into properties to make them reusable and improve the readability of a workflow. Properties may be concatenated into another property, declared in the workflow itself or in a properties file. All the rich editor features like content assist, validation and go-to declaration are available for properties and composed properties as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Content assist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="468" height="386"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8690396&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=8690396&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="468" height="386"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;As MWE uses reflection to assemble Java object graphs, the configuration files contain a lot of references to Java types and their methods. Based on the type compatibility constraints of the language, the editor will propose all the valid Java types. The necessary information will be derived from the classpath configuration of your Java projects and even the types in your source folders are available in your MWE file.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Class imports&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="468" height="386"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8690583&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=8690583&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="468" height="386"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;As we leverage many powerful features of the Xtext framework, it was easy to introduce import statements for Java types to keep the syntax even more compact. Even the content assist is aware of existing imports and will automatically insert a fully qualified name if necessary and a simple name if possible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Navigate to types and methods&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;object width="468" height="386"&gt;&lt;param name="allowfullscreen" value="true" /&gt;&lt;param name="allowscriptaccess" value="always" /&gt;&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=8690621&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=8690621&amp;amp;server=vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=DBD7EF&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="468" height="386"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;Advanced navigation features like "Go To Declaration" make it easier to understand the configuration itself as well as the configured components. The new MWE editor makes it possible to jump directly to the appropriate members or types that your workflow refers to.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The new concrete syntax for the MWE language is easier to read and edit then the existing XML format. Nevertheless, the ideas behind MWE will remain stable. The language consists of a small number of orthogonal, seperated concepts which make it easy to understand and yet powerful. The new syntax focusses on those clean core concepts to make them easier to grasp while providing sophisticated editor features and tool support.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What's next&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The prototype is already available in the &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.emf/org.eclipse.emf.mwe/plugins/?root=Modeling_Project"&gt;Eclipse CVS&lt;/a&gt; although it still lacks some features and - more important - a connector to the runtime of MWE. We are currently planning to make it available in Summer 2010 in line with the Eclipse Helios release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-1570816806791451157?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/1570816806791451157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=1570816806791451157' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/1570816806791451157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/1570816806791451157'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2010/01/sneak-peek-at-new-mwe-editor.html' title='A sneak peek at the new MWE editor'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-4672273128573854079</id><published>2009-08-12T14:17:00.003+02:00</published><updated>2009-08-12T15:07:59.768+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext 0.7.2 has been released</title><content type='html'>Almost four weeks after the &lt;a href="http://blog.efftinge.de/2009/07/xtext-071-available.html"&gt;first service release&lt;/a&gt; for &lt;a href="http://www.xtext.org"&gt;TMF Xtext&lt;/a&gt;, we are proud to make Xtext 0.7.2 available for &lt;a href="http://www.eclipse.org/Xtext/download/"&gt;download&lt;/a&gt;. Nearly &lt;a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;classification=Modeling&amp;amp;product=TMF&amp;amp;version=0.7.0&amp;amp;version=0.7.1&amp;amp;version=unspecified&amp;amp;target_milestone=SR2&amp;amp;long_desc_type=allwordssubstr&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;status_whiteboard_type=allwordssubstr&amp;amp;status_whiteboard=&amp;amp;keywords_type=allwords&amp;amp;keywords=&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;known_name=Xtext+0.7.1&amp;amp;query_based_on=Xtext+0.7.1&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0="&gt;40 issues&lt;/a&gt; have been fixed or improved in this release. Among them are some bugs with the serialization algorithm that occured in rare situations or fixes with the computation of available template proposals. Furthermore we improved the immediate user feedback in the Xtext grammar editor. It comes with more &lt;a href="http://blogs.itemis.de/stundzig/archives/467"&gt;semantic highlighting&lt;/a&gt; and better validation for erroneous grammars. Internally we refactored some code to make it easier to customize because the default implementation may not suit your very own needs in each and every scenario. Some restrictions have been removed in this field to match even more use cases.&lt;br /&gt;&lt;br /&gt;The probably most noteable changes affect a functionality, that has been available from the very beginning of Xtext in the 0.7 release but did not get to much attention although it may be quite interesting for you. Xtext ships with a generator fragment for &lt;a href="http://www.eclipse.org/Xtext/documentation/0_7_2/xtext.html#projectwizard"&gt;new DSL projects&lt;/a&gt;, the &lt;span style="font-family: courier new;"&gt;SimpleNewProjectWizard&lt;/span&gt;. Although it is disabled by default - which means you have to uncomment it in your workflow file that generates your language - it may be quite handy for you. The  fragment registers an Eclipse wizard for new projects. Such a project will know about all the required dependencies, contain a sample model file and a sample workflow file. It acts as a jump start for language users. The language designer can customize the initial content of the project and has a lot of flexibility. This feature may be really helpful for many Xtext users.&lt;br /&gt;&lt;br /&gt;The easiest way to get Xtext is the &lt;a href="http://download.itemis.com/updates"&gt;update site&lt;/a&gt; at &lt;a href="http://xtext.itemis.com"&gt;itemis&lt;/a&gt; which will install all required projects and dependencies in one shot. The updated full distribution with Xtext, MWE and Xpand 0.7.2 and support for Subversion, EMF Compare and all this fancy stuff will be available in the next hours.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-4672273128573854079?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/4672273128573854079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=4672273128573854079' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4672273128573854079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/4672273128573854079'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/08/xtext-072-has-been-released.html' title='Xtext 0.7.2 has been released'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-5885104776832911018</id><published>2009-07-31T22:34:00.005+02:00</published><updated>2009-07-31T23:37:14.668+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext meets Athena</title><content type='html'>The weather reports look pretty good for TMF &lt;a href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt;: The &lt;a href="https://build.eclipse.org/hudson/view/Modeling/"&gt;sun has been shining&lt;/a&gt; for a few builds and hopefully this trend will continue.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_OvMG_klGAe8/SnNjHISFvRI/AAAAAAAAAPw/Td4srwh0ldE/s1600-h/green_build.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 318px; height: 36px;" src="http://3.bp.blogspot.com/_OvMG_klGAe8/SnNjHISFvRI/AAAAAAAAAPw/Td4srwh0ldE/s400/green_build.png" alt="" id="BLOGGER_PHOTO_ID_5364740555261984018" border="0" /&gt;&lt;/a&gt;Due to the fact, that the emft buildserver will be down permanently from August, 5th, &lt;a href="https://www.xing.com/profile/Dennis_Huebner2"&gt;Dennis&lt;/a&gt; &lt;a href="http://wiki.eclipse.org/Modeling_Project_Releng/Migrate_to_a_new_server"&gt;migrated&lt;/a&gt; the Xtext build to the &lt;a href="http://modeling.eclipse.org/modeling/tmf/?project=xtext"&gt;modeling integration server&lt;/a&gt;, which is more powerful and faster then the previous integration system. This worked out pretty well, but we ended up with the very same problem as before: One of our test projects tends to break the build because of an untrapped exception in the compiler. As we have no idea about the reasons of this sudden breakdown - the build was successful for a long time and broke one day without any recognizable modification or log entry, we decided to look out for other possibilities to run our integration tests.&lt;br /&gt;&lt;br /&gt;One promising option was the Eclipse &lt;a href="https://build.eclipse.org/hudson/"&gt;build server&lt;/a&gt;. After we got &lt;a href="https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-emft-mwe-0.7/"&gt;the&lt;/a&gt; &lt;a href="https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-m2t-xpand-0.7/"&gt;build&lt;/a&gt; &lt;a href="http://modeling.eclipse.org/modeling/tmf/?project=xtext"&gt;slots&lt;/a&gt; for the &lt;a href="http://wiki.eclipse.org/Common_Build_Infrastructure"&gt;Athena&lt;/a&gt; common build, which is powered by the &lt;a href="https://hudson.dev.java.net/"&gt;Hudson&lt;/a&gt; continuous integration engine, we gave it a serious try. Dennis did some night shifts to create the configuration for the Xtext build, Xpand and MWE and finally all three projects were green. That was a very good feeling.&lt;br /&gt;&lt;br /&gt;It was straight forward to define dependencies on required projects that will trigger dependent builds and to configure schedules for nightly builds. My overall impression is, that this infrastructure is easier to handle than the modeling build, it's definitly a step forward. What I like most - besides the easy configuration and the fact that it &lt;span style="font-style: italic;"&gt;just builds our project&lt;/span&gt; - are the neat &lt;a href="https://build.eclipse.org/hudson/view/Modeling/job/cbi-tmf-xtext-0.7/"&gt;statistics&lt;/a&gt; and the weather report icons that indicate the trend of a project. Maybe we finally heralded the &lt;a href="http://www.wetteronline.de/Schleswig-Holstein/Kiel.htm"&gt;summer&lt;/a&gt;&lt;a href="http://www.itemis.de/itemis-ag/unternehmen/standorte/language=de/573/kiel"&gt;&lt;/a&gt;?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-5885104776832911018?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/5885104776832911018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=5885104776832911018' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5885104776832911018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5885104776832911018'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/07/xtext-meets-athena.html' title='Xtext meets Athena'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_OvMG_klGAe8/SnNjHISFvRI/AAAAAAAAAPw/Td4srwh0ldE/s72-c/green_build.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-3680786341400123365</id><published>2009-07-14T22:22:00.006+02:00</published><updated>2009-07-14T23:42:10.971+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext 0.7.1 is in the starting blocks</title><content type='html'>After an exciting &lt;a href="http://www.eclipse.org/galileo/"&gt;Eclipse Galileo&lt;/a&gt; release, some celebrating and catching up a lot of sleep we decided to have a bugfix release short after Xtext 0.7.0 to incorporate some fixes that we had in the pipeline but that accidently didn't make it into the final Galileo build. The 0.7.1 release of &lt;a href="http://www.eclipse.org/Xtext"&gt;TMF Xtext&lt;/a&gt; is scheduled for Friday, 17th of July, 2009 and it will contain more than &lt;a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;classification=Modeling&amp;amp;product=TMF&amp;amp;version=0.7.0&amp;amp;target_milestone=SR1&amp;amp;long_desc_type=allwordssubstr&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;status_whiteboard_type=allwordssubstr&amp;amp;status_whiteboard=&amp;amp;keywords_type=allwords&amp;amp;keywords=&amp;amp;bug_status=RESOLVED&amp;amp;bug_status=VERIFIED&amp;amp;resolution=FIXED&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;known_name=Xtext+0.7.1&amp;amp;query_based_on=Xtext+0.7.1&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0="&gt;20 fixes and a few minor features&lt;/a&gt; that will improve the usability for both mouse and keyboard addicted users.&lt;br /&gt;&lt;br /&gt;Thanks for all the valuable feedback that helped us to decide about the important issues that existed in the first release of TMF Xtext. Without the various complaints, questions and suggestions of our users in the &lt;a href="http://www.eclipse.org/newsportal/thread.php?group=eclipse.modeling.tmf"&gt;newsgroup&lt;/a&gt;, the reports in the &lt;a href="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;product=TMF&amp;amp;component=Xtext&amp;amp;long_desc_type=allwordssubstr&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;status_whiteboard_type=allwordssubstr&amp;amp;status_whiteboard=&amp;amp;keywords_type=allwords&amp;amp;keywords=&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;known_name=xtext&amp;amp;query_based_on=xtext&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0="&gt;bugtracker&lt;/a&gt; and the responses via &lt;a href="http://twitter.com/xtext"&gt;twitter&lt;/a&gt;, it would have been much more difficult to know where the shoe pinches.&lt;br /&gt;&lt;br /&gt;Special thanks go to &lt;a href="https://www.xing.com/profile/Alexander_Nittka"&gt;Alex&lt;/a&gt; from &lt;a href="http://blogs.itemis.de/stundzig/"&gt;itemis Leipzip&lt;/a&gt; who visited us for one week in July to learn about the new version Xtext. Thereby he provided much feedback and told us about somewhat unexpected use cases. We could cover many topics about Xtext and beyond and it was great fun to learn about other people's experiences with the framework and to provide immediate help whenever possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-3680786341400123365?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/3680786341400123365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=3680786341400123365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3680786341400123365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3680786341400123365'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/07/xtext-071-is-in-starting-blocks.html' title='Xtext 0.7.1 is in the starting blocks'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-3455984897950223022</id><published>2009-03-18T20:24:00.012+01:00</published><updated>2009-03-19T08:55:38.632+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext Corner #4 – Customizing the generator</title><content type='html'>TMF &lt;a href="http://www.xtext.org/"&gt;Xtext&lt;/a&gt; &lt;a href="http://emft.eclipse.org/modeling/tmf/"&gt;M6&lt;/a&gt; has been &lt;a href="http://www.eclipse.org/newsportal/article.php?id=460&amp;amp;group=eclipse.modeling.tmf#460"&gt;released&lt;/a&gt; on Tuesday, 17 May 2009, and it comes with a bunch of &lt;a href="http://wiki.eclipse.org/Xtext/Documentation/Xtext_New_and_Noteworthy"&gt;handy new features&lt;/a&gt;. One of the most remarkable changes since &lt;a href="http://zarnekow.blogspot.com/2009/01/xtext-corner-3-m5-whats-in-pipeline.html"&gt;milestone 5&lt;/a&gt; is the redesigned generator infrastructure. A highly configurable, declarative framework has superseded the monolithic implementation, that we used previously.&lt;br /&gt;&lt;br /&gt;The core idea behind the shiny new generator are so called &lt;a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.tmf/org.eclipse.xtext/plugins/org.eclipse.xtext.generator/src/org/eclipse/xtext/generator/IGeneratorFragment.java?root=Modeling_Project&amp;amp;view=co"&gt;generator fragments&lt;/a&gt;. They allow to contribute entries to various places during the generation process. It is possible to add extensions to the &lt;a href="http://www.eclipse.org/articles/Article-Plug-in-architecture/plugin_architecture.html#2."&gt;plugin.xml&lt;/a&gt;, declare exported packages for the &lt;a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/plugin_manifest.html"&gt;MANIFEST.MF&lt;/a&gt; or list guice &lt;a href="http://code.google.com/p/google-guice/wiki/Bindings"&gt;bindings&lt;/a&gt;. Furthermore and properly most important: generator fragments provide a mighty mechanism to create any kind of output files utilizing the &lt;a href="http://www.eclipse.org/modeling/m2t/?project=xpand"&gt;Xpand&lt;/a&gt; template language.&lt;br /&gt;&lt;br /&gt;Because the interface of fragments has been designed to be composable, it is easily possible to implement reusable components. Xtext itself ships with a neat set of default and often required fragments.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.gadgettastic.com/de/2008/10/09/working-lego-v8-engine/"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 137px; height: 150px;border: 0;border-style: none;" src="http://www.festum.de/1000steine/bilder/legosteine.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;ul&gt;&lt;li&gt;The generated grammar access provides strongly typed accessors for the various elements of your &lt;a href="http://encyclopedia2.thefreedictionary.com/concrete+syntax"&gt;concrete syntax&lt;/a&gt; such as alternatives, assignments, cross references and keywords.&lt;/li&gt;&lt;li&gt;The Xtext parser that is responsable for reading text and instantiating a model. You'll get optionally an &lt;a href="http://www.antlr.org/"&gt;ANLTR&lt;/a&gt;-Parser, too.&lt;/li&gt;&lt;li&gt;A serializer, that is capable to transform the semantic model into its native textual form.&lt;/li&gt;&lt;li&gt;Xtext comes with a fragment, that creates a &lt;a href="http://apps.itemis.de/roller/itemislabkiel/entry/evalidator_adapter_for_oaw_check"&gt;Check based validation&lt;/a&gt; stub. It allows to implement constraints for model instances declarativly. As there exists another fragment for java based validation, it is possible to use both and combine the expressivness of Check with the performance boost of native Java code for expensive validation.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A Java API for content assist is generated for the editor of your DSL. You can even choose to use an Xtend based API.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You'll get a custom EMF resource factory, that will create and configure your Xtext resources.&lt;/li&gt;&lt;li&gt;And the fragment that covers functionality that has not been in Xtext before, will generate Java classes for the infered metamodels. It uses EMF &lt;a href="http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.emf.doc/references/javadoc/org/eclipse/emf/codegen/ecore/genmodel/GenModel.html"&gt;GenModels&lt;/a&gt; to output their corresponding Java API. Working with your semantic model is far more comfortable when there is no nead to deal with dynamic EMF models.&lt;/li&gt;&lt;/ul&gt;To create a library of generator fragments, we had to provide a simple way to parameterize the generator. Instead of instantiating objects the hard way and write a lot of Java code with constructor calls, getters and setters, we decided to use the &lt;a href="http://www.eclipse.org/modeling/emft/?project=mwe"&gt;Modeling Workflow Enging (MWE)&lt;/a&gt; to configure it. Clients plug the fragments they want to use, simply together by listing them in a workflow file. There is no need to write a single line of Java code to customize the behaviour or to execute the Xtext generator.&lt;br /&gt;&lt;br /&gt;If someone &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=239565"&gt;has&lt;/a&gt; &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=264837"&gt;special&lt;/a&gt; &lt;a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=268047"&gt;needs&lt;/a&gt; for his language generation, he can implement a generator fragment that serves his very own interests well. Is your solution matching potential requirements of other parties, too? We will be happy to accept patches with reusable, customizable fragments to be packaged with Xtext.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-3455984897950223022?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/3455984897950223022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=3455984897950223022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3455984897950223022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/3455984897950223022'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/03/xtext-corner-4-customizing-generator.html' title='Xtext Corner #4 – Customizing the generator'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-8760686475323069731</id><published>2009-01-28T15:07:00.015+01:00</published><updated>2009-01-28T16:12:40.515+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext Corner #3 – M5: What's in the pipeline?</title><content type='html'>Some cool things will come up with the next milestone of TMF Xtext on February, 6th 2009.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The outline view has been redesigned. From now on it is possible to create a representation of your source file's structure, that does not necessarily map the semantic model one to one. You are free to include virtual nodes to emphasize aspects of special interest or to group the objects in another way as it is done in the textual source file.&lt;/li&gt;&lt;li&gt;Xtext resources observe their referenced models and can reload them to reflect recent changes transparently. This improves the overall user experience and provides faster feedback.&lt;/li&gt;&lt;li&gt;We will come up with a first draft of an Xtend API for the new Xtext. It is not as powerful as the corresponding Java API, but still very useful especially for early prototyping. Most notably Xtend is very convenient when you have to work with dynamic EMF models. Furthermore it comes with a nice collection API.&lt;/li&gt;&lt;/ul&gt;There is one more thing ...&lt;br /&gt;&lt;br /&gt;Due to an &lt;a href="http://blog.efftinge.de/2009/01/xtext-new-parser-backend.html"&gt;IP issue&lt;/a&gt; with &lt;a href="http://www.antlr.org/"&gt;Antlr&lt;/a&gt; we are not allowed to use this mature parser generator if we want to be part of the next Eclipse release with TMF Xtext. Unfortunatly we are not satisfied with the &lt;a href="http://lpg.sourceforge.net/"&gt;eclipse compatible alternatives&lt;/a&gt;. That's why we decided to build our own parser generator based on the &lt;a href="http://pdos.csail.mit.edu/%7Ebaford/packrat/"&gt;packrat algorithm&lt;/a&gt;. Besides the effort with implementing &lt;a href="http://en.wikipedia.org/wiki/Another"&gt;yet another&lt;/a&gt; parser generator, there are some positive side effects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;We learned a lot about minimizing dependencies and therefore made the parser more pluggable. If you don't like our home grown packrat parser and even don't want to use Antlr, you can theoretically take any generator of your choice and use it.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Attention: This feature comes without warranty&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;We found a nice way to define &lt;a href="http://en.wiktionary.org/wiki/terminal_symbol"&gt;terminal symbols&lt;/a&gt;. With Xtext M4 you could already write your own lexical rules in a somewhat awkward syntax. The whole body of the rule was a pure string without any syntactical check at design time. Xtext M5 comes with terminal rules. At a first glance, they seem to be like any other parser rule. The clue is, that they allow to define kind of a lexer body with a rich syntax and known semantics. But instead of plain parser rules, they will produce exacly one (leaf-)node in the parsed tree and may not be interrupted by any whitespace or comment.&lt;br /&gt;&lt;textarea name="code" class="xtext"&gt;&lt;br /&gt;// java like block comments&lt;br /&gt;terminal ML_Comment: &lt;br /&gt;  '/*' -&gt; '*/';&lt;br /&gt;&lt;br /&gt;// java like line comments&lt;br /&gt;terminal SL_Comment: &lt;br /&gt;  '//' !('\n'|'\r')* ('\r'? '\n')?;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;Terminal rules will supersede the old school lexer rules.&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Hidden tokens per rule were introduced: You can define terminal tokens as hidden on a per rule basis. If you do not want to have whitespaces between your fully qualified names, you can disallow them easily.&lt;br /&gt;&lt;textarea name="code" class="xtext"&gt;&lt;br /&gt;Entity hidden(&lt;br /&gt;    WS, ML_COMMENT, SL_COMMENT):&lt;br /&gt;  'entity' name=FQN '{' &lt;br /&gt;    property+=Property* &lt;br /&gt;  '}'&lt;br /&gt;&lt;br /&gt;// Property inherits hidden terminals&lt;br /&gt;// from calling rule Entity&lt;br /&gt;Property: /* something */;&lt;br /&gt;&lt;br /&gt;// FQN overrides hidden terminals&lt;br /&gt;FQN returns EString hidden():&lt;br /&gt;  ID ('::' ID)*;&lt;br /&gt;&lt;/textarea&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-8760686475323069731?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/8760686475323069731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=8760686475323069731' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/8760686475323069731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/8760686475323069731'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/01/xtext-corner-3-m5-whats-in-pipeline.html' title='Xtext Corner #3 – M5: What&apos;s in the pipeline?'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-8795141428577948432</id><published>2009-01-19T08:22:00.009+01:00</published><updated>2009-01-19T09:50:27.123+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext Corner #2 - Linking and scoping</title><content type='html'>I've been very busy these days with all this christmas stuff, the M4 milestone of &lt;a href="http://www.xtext.org"&gt;TMF Xtext&lt;/a&gt; and obviously with the next milestone, which will be released mid Feb. That's why I had the rather long delay since my first &lt;a href="http://zarnekow.blogspot.com/2008/11/xtext-corner-1-linking-model.html"&gt;post about linking&lt;/a&gt; in Xtext. In december I discussed some difficulties with multi value references in combination with the default behavior of the Linker. As I promised in my previous post the workaround is not necessary in Xtext M4: You don't have to avoid multi value (non containment) references in metamodels anymore for the ease of validation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.efftinge.de/"&gt;Sven&lt;/a&gt; wrote already a very nice blog &lt;a href="http://blog.efftinge.de/2009/01/xtext-scopes-and-emf-index.html"&gt;post&lt;/a&gt; about the concept of &lt;a href="http://en.wikipedia.org/wiki/Scope_%28programming%29"&gt;scopes&lt;/a&gt; that we introduced in the last milestone. The crucial point is to draw a distinction between visible objects and name matching when linking the model. Therefore we split the default linking service implementation into two main stages.&lt;br /&gt;&lt;br /&gt;The first parts is about identifying all visible objects and creating the so called scope. A scope is an abstraction from linkable EObjects and the algorithm to calculate their valid string representation. Any scope provides all reachable objects paired with information about the valid textual representation – the name – that will match this object starting from a given point in your model, the so called context. Important are two facts:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Scopes can be nested into each other and thus can hide their inherited elements.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A scope does not export two objects with the same name in the same scope-level.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="java"&gt;&lt;br /&gt;public interface IScopeProvider &lt;br /&gt;    extends ILanguageService {&lt;br /&gt;&lt;br /&gt;  IScope getScope(EObject context, &lt;br /&gt;    EReference reference);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public interface IScope {    &lt;br /&gt;&lt;br /&gt;  IScope getOuterScope();&lt;br /&gt;&lt;br /&gt;  Iterable&lt;IScopedElement&gt; getContents();&lt;br /&gt;&lt;br /&gt;  /* .. */&lt;br /&gt;}    &lt;br /&gt;&lt;br /&gt;public interface IScopedElement {&lt;br /&gt; &lt;br /&gt;  String name();&lt;br /&gt; &lt;br /&gt;  EObject element();&lt;br /&gt; &lt;br /&gt;  /* .. */&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;If you think about java, a local variable foo might be declared in a method body, which will make the same named field unreachable by its simple name but require the „this“ qualifier to gain access to it. A well known tool that has to deal with scopes is the eclipse compiler. It will not compile, read „link“, any two fields with the same name in a given class. None of these two fields would be on the scope.&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="java"&gt;&lt;br /&gt;class Bar {&lt;br /&gt;  int foo;&lt;br /&gt;  void setFoo(int foo) {&lt;br /&gt;    this.foo = foo;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class Outer {&lt;br /&gt;  int foo;&lt;br /&gt; &lt;br /&gt;  void foo(int param) { /*.. */ }&lt;br /&gt;  class Inner {&lt;br /&gt;    int foo; // error&lt;br /&gt;    int foo; // error&lt;br /&gt;    void bar() { &lt;br /&gt;      foo(foo); // ok &lt;br /&gt;      // same as &lt;br /&gt;      // foo(Outer.this.foo);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Because we can have fields and methods with the same name, that would both be visible in contrast to equally named variables, the scope provider has to take the type of the objects into account, that should be retrieved. Sven described the semantics of scopes more detailled and provided a neat example.&lt;br /&gt;&lt;br /&gt;The second part of the linking-service' job is to compare the input string with the object names of the scoped elements that were retrieved from the scope provider. That's very easy in most cases because a simple string match is sufficient.&lt;br /&gt;&lt;br /&gt;But it is not necessarily an object, that was retrieved from the scope service, that should be linked. In the Xtext grammar itself, we link imported metamodels to EPackages by a given URI. It is rather impossible to come up with a scope implementation, that iterates each and every metamodel, that can be reached via any given URI. But the linking-service is still able to establish this cross reference. This indicates, that we found some nice abstractions for the common cases, but did not introduce too tight restrictions for the seldom ones.&lt;br /&gt;&lt;br /&gt;Let's come back to the example from my previous post. It is now possible to write the grammar for the given example language in the most intuitive way using the M4 milestone of TMF Xtext. By default, the linker will only cross-reference objects, that have a unique name. Even for multi value references, we will get very good error indicators for free. The last thing to do is to provide a check, that every object is linked only once for a reference, that means the list contains distinct values. Should really be a no brainer with Xtend ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-8795141428577948432?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/8795141428577948432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=8795141428577948432' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/8795141428577948432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/8795141428577948432'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2009/01/xtext-corner-2-linking-and-scoping.html' title='Xtext Corner #2 - Linking and scoping'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-5042550594669469807</id><published>2008-11-30T14:11:00.002+01:00</published><updated>2008-11-30T14:12:46.121+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='Xtext'/><title type='text'>Xtext Corner #1 - Linking the model</title><content type='html'>One of the core features of &lt;a href="http://wiki.eclipse.org/Xtext"&gt;Xtext&lt;/a&gt; is the ability, to create a &lt;a href="http://en.wikipedia.org/wiki/Abstract_semantic_graph"&gt;semantic model&lt;/a&gt; from a set of input files. While loading the &lt;a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.5.0/org/eclipse/emf/ecore/resource/Resource.html"&gt;resource&lt;/a&gt;, Xtext transforms the parsed &lt;a href="http://en.wikipedia.org/wiki/Abstract_syntax_tree"&gt;AST&lt;/a&gt; into a &lt;a href="http://martinfowler.com/dslwip/SemanticModel.html"&gt;domain model&lt;/a&gt; and trys to cross link the model elements.&lt;br /&gt;&lt;br /&gt;From an information theory point of view this cannot be solved generally for every imaginable language, but we try to provide reasonable defaults with Xtext. A quick start with a language, that fulfils common usecases, should be as easy as possible. So we based the default linking on some kind of heuristics: Most likely, one would reference a model element by some kind of name, so we look for name &lt;a href="http://download.eclipse.org/modeling/emf/emf/javadoc/2.5.0/org/eclipse/emf/ecore/EStructuralFeature.html"&gt;features&lt;/a&gt; in the model elements and try to match them with the input text for a reference.&lt;br /&gt;&lt;br /&gt;Lets consider a small example language for clarification:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="xtext"&gt;&lt;br /&gt;language sample.linking.SampleLang;&lt;br /&gt;generate SampleLang &lt;br /&gt;  "http://sample/linking/samplelang/v1"&lt;br /&gt;&lt;br /&gt;Container:&lt;br /&gt;  content+=Object*;&lt;br /&gt;&lt;br /&gt;Object:&lt;br /&gt;  idx=INT ':' name=ID (&lt;br /&gt;    'refs' ref+=[Object] (',' ref+=[Object])*&lt;br /&gt;  )?;&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;The following input file would certainly match the given concrete syntax:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="xtext"&gt;&lt;br /&gt;1: Obj1 refs Obj2&lt;br /&gt;2: Obj2&lt;br /&gt;3: Obj2&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;If we take a look at the lines two and three, we notice two objects in the container, that have the same name, but different indexes. The default linking implementation that ships with the &lt;a href="http://emft.eclipse.org/modeling/tmf/downloads/?showAll=1&amp;hlbuild=N200811141730&amp;project=xtext"&gt;M3 Milestone of TMF Xtext&lt;/a&gt; would try to link both 'Obj2' for the reference in line one. This seems to be perfectly ok, because our objects can refer to many other objects (note the '+=' notation in the concrete syntax of our language). &lt;br /&gt;&lt;br /&gt;But in many cases, the user would expect, that the reference points to a unique object, even if the metamodel allows multiple values for a feature.&lt;br /&gt;So how can we identifiy these ambiguities without implementing the whole linking service ourself? The simple answer is: In TMF Xtext M3, we cannot. But there is a workaround.&lt;br /&gt;&lt;br /&gt;What we have to do is to slightly modify our grammar and therefore derive a different metamodel:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="xtext"&gt;&lt;br /&gt;language sample.linking.SampleLang;&lt;br /&gt;generate SampleLang &lt;br /&gt;  "http://sample/linking/samplelang/v2"&lt;br /&gt;&lt;br /&gt;Container:&lt;br /&gt;  content+=Object*;&lt;br /&gt;&lt;br /&gt;Object:&lt;br /&gt;  idx=INT ':' name=ID (&lt;br /&gt;    'refs' ref+=ObjectRef (',' ref+=ObjectRef)*&lt;br /&gt;  )?;&lt;br /&gt;&lt;br /&gt;ObjectRef:&lt;br /&gt;  obj=[Object];&lt;br /&gt;&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;The refined 'SampleLang' uses a combination of containment and single value references instead of multi value references. At a first glance, we have greater efforts when writing functions that use our models. So what is the benefit? The default linking implementation works out of the box and implementing constraints on top of that to check our new kind of multi value references is pretty straight forward.&lt;br /&gt;&lt;br /&gt;But whats the good news? This workaround does its job. And even better: It will not be required in TMF Xtext M4 which will be released at the end of the year. We thought again about linking and will come up with another default implementation, that is suitable for many more cases, which cannot be handled by the default language services in M3.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-5042550594669469807?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/5042550594669469807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=5042550594669469807' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5042550594669469807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/5042550594669469807'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2008/11/xtext-corner-1-linking-model.html' title='Xtext Corner #1 - Linking the model'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-9124749989697822203</id><published>2008-11-12T22:39:00.022+01:00</published><updated>2008-11-30T13:26:12.966+01:00</updated><title type='text'>Optimistic Locking Revised</title><content type='html'>When you implement concurrency control in a business application, you have to decide if you use &lt;a href="http://sql.wikis.com/wc.dll?SQL%7EPessimisticLocking"&gt;pessimistic&lt;/a&gt; or &lt;a href="http://sql.wikis.com/wc.dll?SQL%7EOptimisticLocking%7ESoftwareEng"&gt;optimistic locking&lt;/a&gt;. For some types of applications optimistic locking is sufficient, because in the most common cases users would modify different resources, thus only a few of them would rant  about lost changes. If you use optimistic locking, subsequent conflicting changes will be denied and the user has to update his view on the data and redo his modifications prior to saving the resources.&lt;br /&gt;&lt;br /&gt;Basically there exist two ways to implement optimistic locking. Both of them have advantages and disadvantages.&lt;br /&gt;&lt;ol&gt;&lt;li&gt;One solution is to check the original state of every modified property against the current value in the database and only update the affected columns. This implies, that almost every update statement is a custom statement. You cannot use prepared statements to perform batch updates. This can be a major performance drawback.&lt;br /&gt;&lt;br /&gt;The statements would look like this:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="sql"&gt;&lt;br /&gt;UPDATE table_name SET&lt;br /&gt;  data1 = :data1,&lt;br /&gt;  data2 = :data2&lt;br /&gt;WHERE pk = :pk&lt;br /&gt;  AND data1 = :old_data1&lt;br /&gt;  AND data2 = :old_data2&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The second possibility is to introduce some kind of &lt;a href="http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#entity-mapping-entity-version"&gt;update counter&lt;/a&gt; in your table. Before you update a record in the database, the current value of the update counter is checked against the base value, that was read by the client. If both values are equal, the update is performed and the counter increased. The update counter is either an integer or a timestamp.&lt;br /&gt;&lt;br /&gt;This is a typical example for an update statement using an update counter:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="sql"&gt;&lt;br /&gt;UPDATE table_name SET&lt;br /&gt;  data1 = :data1,&lt;br /&gt;  data2 = :data2,&lt;br /&gt;  data3 = :data3,&lt;br /&gt;  blob = :blob,&lt;br /&gt;  update_count = update_count + 1&lt;br /&gt;WHERE pk = :pk&lt;br /&gt;  AND update_count = :update_count&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;The obvious advantage of this technique is the possibility to use prepared statements because the structure and the parameter list is the same for any given modified record in a table. But the chance is, that modifications are refused, even if they are not conflicting. The new data could be the same as in the persistet record, or only distinct properties could have been modified compared to the common base version. In both cases this solution would be quite frustrating or at least confusing from a users point of view.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;If you implement optimistic locking with on of these patterns, you have to check against the number of modified records in your code, when you execute such a query. In pseudo code with a java like syntax this would look like the following snippet:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="java"&gt;&lt;br /&gt;Statement s = findUpdateStatementFor(&lt;br /&gt;                businessObj.getType());&lt;br /&gt;s.setParametersFrom(businessObj);&lt;br /&gt;int affectedRecords = s.exec();&lt;br /&gt;if (affectedRecords == 0) &lt;br /&gt;  throw new ConcurrentModificationException(&lt;br /&gt;    businessObj, &lt;br /&gt;    findLastModification(businessObj));&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;Neither the first nor the second obvious implementation is satisfying because of the mentioned drawbacks. Let's try to combine the advantages of both worlds at the expense of a slightly more complex pattern for update statements:&lt;br /&gt;&lt;br /&gt;&lt;textarea name="code" class="sql"&gt;&lt;br /&gt;UPDATE table_name SET&lt;br /&gt;  data1 = CASE&lt;br /&gt;    WHEN 1 = :data1_changed THEN :data1&lt;br /&gt;    ELSE data1 END,&lt;br /&gt;  data2 = CASE&lt;br /&gt;    WHEN 1 = :data2_changed THEN :data2&lt;br /&gt;    ELSE data2 END,&lt;br /&gt;  data3 = CASE&lt;br /&gt;    WHEN 1 = :data3_changed THEN :data3&lt;br /&gt;    ELSE data3 END,&lt;br /&gt;  blob = CASE&lt;br /&gt;    WHEN 1 = :blob_changed THEN :blob&lt;br /&gt;    ELSE blob END,&lt;br /&gt;  update_count = update_count + 1&lt;br /&gt;WHERE pk = :pk&lt;br /&gt;  AND (update_count = :update_count &lt;br /&gt;    OR (&lt;br /&gt;      (    0 = :data1_changed &lt;br /&gt;        OR data1 = :data1 &lt;br /&gt;        OR data1 = :old_data1)&lt;br /&gt;      AND&lt;br /&gt;      (    0 = :data2_changed &lt;br /&gt;        OR data2 = :data2 &lt;br /&gt;        OR data2 = :old_data2)&lt;br /&gt;      AND&lt;br /&gt;      (    0 = :data3_changed &lt;br /&gt;        OR data3 = :data3 &lt;br /&gt;        OR data3 = :old_data3)&lt;br /&gt;      AND &lt;br /&gt;      (    0 = :blob_changed))&lt;br /&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;This implementation reduces the risk for wrongly refused updates to a minimum. It even allows special treatment of blob fields, that cannot be compared directly. Additionally you have the chance, to define special semantics for field groups, e.g. if any value in a group has been modified, the whole update can be denied, even if the concrete field that changed was not previously edited by another user.&lt;br /&gt;&lt;br /&gt;I don't know about any implementation of this idea, but I am very interested in experience from the real world. Especially reports about performance differences and the influence on the overall usability are welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-9124749989697822203?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/9124749989697822203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=9124749989697822203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/9124749989697822203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/9124749989697822203'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2008/11/optimistic-locking-revised.html' title='Optimistic Locking Revised'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6255758224607466565.post-73207829932691358</id><published>2008-11-07T12:07:00.008+01:00</published><updated>2008-11-14T20:14:28.661+01:00</updated><title type='text'>Here we go ...</title><content type='html'>This is the mandatory first blog post in and about this blog. On an irregular basis I will write about random topics like software development and abritrary banalities. Stay tuned.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6255758224607466565-73207829932691358?l=zarnekow.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zarnekow.blogspot.com/feeds/73207829932691358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6255758224607466565&amp;postID=73207829932691358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/73207829932691358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6255758224607466565/posts/default/73207829932691358'/><link rel='alternate' type='text/html' href='http://zarnekow.blogspot.com/2008/11/here-we-go.html' title='Here we go ...'/><author><name>Sebastian Zarnekow</name><uri>http://www.blogger.com/profile/05886096380926364322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_OvMG_klGAe8/SRQamltN5nI/AAAAAAAAAM4/X3RZ2T39cNU/s1600-R/0e7db65fa.3484000.jpg'/></author><thr:total>0</thr:total></entry></feed>
