blob: 229d5711d97d7144778781962e352f9b59eada87 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<title>Xtext - Xtext 2.11.0 Release Notes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description"
content="The website of Eclipse Xtext, an open-source framework for development of programming languages and domain-specific languages">
<meta name="author" content="Sven Efftinge">
<meta name="author" content="Miro Spoenemann">
<!-- styles -->
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src=""></script>
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="/Xtext/images/favicon.png">
<link href="/Xtext/css/bootstrap.css" rel="stylesheet" type='text/css'>
<link href="/Xtext/css/bootstrap-responsive.css" rel="stylesheet" type='text/css'>
<link href="/Xtext/css/shield-responsive.css" rel="stylesheet" type='text/css'>
<link href='/Xtext/css/fonts.css' rel='stylesheet' type='text/css'>
<link href="/Xtext/css/prettyPhoto.css" rel="stylesheet" media="screen" type='text/css'>
<link href="/Xtext/css/prettify.css" type="text/css" rel="stylesheet"/>
<link href="/Xtext/css/style.css" rel="stylesheet" type='text/css'>
<!-- cover flow -->
<link href="/Xtext/css/coverflow.css" rel="stylesheet" type='text/css'>
<!--[if lt IE 9]>
<link href="/css/iebugs.css" rel="stylesheet" type='text/css'>
<!-- BEGIN Cookie Consent
<link rel="stylesheet" type="text/css" href="//" />
<script src="//"></script>
window.addEventListener("load", function(){
"palette": {
"popup": {
"background": "#000"
"button": {
"background": "#f1d600"
"theme": "edgeless",
"type": "opt-in",
onInitialise: function (status) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (type == 'opt-in' && didConsent) {
// TODO: enable cookies
if (type == 'opt-out' && !didConsent) {
// TODO: disable cookies
onStatusChange: function(status, chosenBefore) {
var type = this.options.type;
var didConsent = this.hasConsented();
if (type == 'opt-in' && didConsent) {
// TODO: enable cookies
if (type == 'opt-out' && !didConsent) {
// TODO: disable cookies
onRevokeChoice: function() {
var type = this.options.type;
if (type == 'opt-in') {
// TODO: disable cookies
if (type == 'opt-out') {
// TODO: enable cookies
"content": {
"href": ""
END Cookie Consent -->
<header class="site-header">
<!-- Navbar -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse"
data-target=".nav-collapse"> <span class="icon-bar"></span> <span
class="icon-bar"></span> <span class="icon-bar"></span>
</a> <a class="brand" href="/Xtext/index.html"></a>
<div class="nav-collapse collapse" style="height: 0px;">
<ul class="nav">
<!--li ><a href="/Xtext/news.html">News</a></li-->
<li ><a href="/Xtext/download.html">Download</a></li>
<li ><a href="/Xtext/documentation/index.html">Documentation</a></li>
<li ><a href="/Xtext/community.html">Community</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Support &amp; Trainings<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="" target="_blank">itemis</a></li>
<li><a href="" target="_blank">TypeFox</a></li>
<li ><a href="">Xtend</a></li>
<!--div class="nav pull-right">
<li ><a><iframe src="" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></a></li>
<!--/.nav-collapse -->
<!-- Navbar End -->
<div class="page-content">
<div class="wrapper">
<div id="page">
<div class="inner">
<div id="maincontainer" class="container">
<div class="span8 offset1">
<h1>Xtext 2.11.0 Release Notes</h1>
<h4>Feb 1, 2017</h4>
<p>Version 2.11.0 is the first release of Xtext after its big internal restructuring. The successful core of Xtext is used in many applications and projects around the world, as a result our main focus for 2.11 has been keeping the high quality and stability of the project while setting the course for a more sustainable future.</p>
<h2 id="restructuring-and-build">Restructuring and Build</h2>
<p>Xtext and Xtend used to be one big Git repository containing all sources for Eclipse, IDEA, Web integration etc. As of 2.11, we split that into multiple smaller repository, such that you can choose yourself which ones you need. These are</p>
<li><a href="">xtext-core</a>: The core framework, <a href="">Language Server</a> support</li>
<li><a href="">xtext-lib</a>: Libraries for <a href="/Xtext/documentation/305_xbase.html">Xbase</a> and <a href="">Xtend</a></li>
<li><a href="">xtext-extras</a>: Additional editor-independent features, mostly Java support</li>
<li><a href="">xtext-eclipse</a>: Plug-ins for <a href="">Eclipse</a></li>
<li><a href="">xtext-idea</a>: Plug-ins for <a href="">IntelliJ IDEA</a></li>
<li><a href="">xtext-web</a>: Support for <a href="">Orion</a>, <a href="">Ace</a> and <a href="">CodeMirror</a></li>
<li><a href="">xtext-maven</a>: Support for <a href="">Maven</a></li>
<li><a href="">xtext-xtend</a>: The <a href="">Xtend</a> language</li>
<li><a href="">xtext-umbrella</a>: Common Eclipse features and P2 update sites</li>
<p>In addition to that, we use Gradle now to build all non-Eclipse artifacts and Maven/Tycho for the Eclipse plug-ins. We have also set up a very sophisticated staged Jenkins build that allows to build from individual branches as well.</p>
<h2 id="language-server-protocol">Language Server Protocol</h2>
<p>With 2.11 the Xtext project supports the <a href="">language server protocol</a> (LSP), which will allow users to host their languages in many different editors. So far LSP support for <a href="">VS Code</a>, the Eclipse IDE, <a href="">Eclipse Che</a>, <a href="">Eclipse Orion</a>, and Emacs exists. Furthermore Microsoft’s Monaco editor provides support and can be integrated in any JavaScript application.</p>
<p>The LSP support in Xtext v2.11 is marked as provisional to leave open the possibility to further enhance the architecture and API. That said it is known to be used in commercial products already. Also in the long term the LSP support might replace the native <a href="/Xtext/documentation/330_web_support.html">web-editor support</a>.</p>
<p><img src="/Xtext/images/releasenotes/2_11_vscode_example.png" alt="" /></p>
<h2 id="idea-support">IDEA Support</h2>
<p>The IntelliJ IDEA integration of Xtext is currently lacking contributors. Therefore, unfortunately, the IDEA support has <strong>not</strong> been part of the 2.11 release. <a href="">Contributions are very welcome</a>!</p>
<h2 id="important-changes">Important Changes</h2>
<h3 id="execution-environment">Execution Environment</h3>
<p>All Xtext plug-ins now require JavaSE-1.8 as execution environment. The minimal supported target platform is Eclipse Luna.</p>
<h3 id="testing-projects">Testing Projects</h3>
<p>There are new projects <code>org.eclipse.xtext.testing</code> for general testing utility and <code>org.eclipse.xtext.xbase.testing</code> for testing Xbase languages. These projects contain the platform-independent code from <code>org.eclipse.xtext.junit4</code> and <code>org.eclipse.xtext.xbase.junit</code>, respectively. The classes that have been copied to the new <code>testing</code> projects are now marked as deprecated in the old <code>junit</code> projects, but those can still be used for testing Eclipse UI features.</p>
<h3 id="ide-guice-module">IDE Guice Module</h3>
<p>Xtext uses <a href="/Xtext/documentation/302_configuration.html#dependency-injection">dependency injection with Guice</a> for language-specific configuration. There are separated hierarchies of Guice modules that aim at different integration platforms: <a href="">Runtime</a> (core services used by all language integrations), <a href="">Eclipse</a>, <a href="/org.eclipse.xtext.idea/src/org/eclipse/xtext/idea/DefaultIdeaModule.xtend">IDEA</a>, and <a href="">Web</a>. The 2.11 release introduces a new <a href="">IDE</a> module hierarchy, which is used for generic editor and IDE features. This new module is employed by the <a href="/Xtext/documentation/330_web_support.html">web-editor support</a> and the LSP support, but not by the Eclipse and IDEA integrations.</p>
<p>The new IDE module brings reusability of many language-specific services, but the price for this is some API breakage. If you are already using the web-editor support, you’ll need to make a few changes to your language configuration:</p>
<li>Remove constructors from <code>&lt;Language Name&gt;WebModule</code>. ExecutorServices are now managed by the <a href="">ExecutorServiceProvider</a> and disposed by the <a href="">DisposableRegistry</a>.</li>
<li>Move custom bindings for generic IDE services from <code>&lt;Language Name&gt;WebModule</code> to the new <code>&lt;Language Name&gt;IdeModule</code> (e.g. content assist).</li>
<li>Fix <code>&lt;Language Name&gt;WebSetup</code> and <code>&lt;Language Name&gt;Servlet</code>; if unsure how to do that, delete them, re-run the language generator workflow, and reapply any customizations you made.</li>
<h2 id="xbase-features">Xbase Features</h2>
<h3 id="improved-xbase-compiler">Improved Xbase Compiler</h3>
<p>The Java code produced by the Xbase compiler is now <a href="">less verbose and more readable</a>. For many situations Xbase does not produce synthetic variables anymore.</p>
<p>For <a href="">switch statements on Strings</a> an additional null guard is produced. This lead to NPEs when a null argument was passed to the switch statement.</p>
<p><img src="/Xtext/images/releasenotes/2_11_xbase-switch-nullguard.png" alt="" /></p>
<p>A for-loop over an array resulted in uncompilable Java code. This has been <a href="">fixed</a>.</p>
<h3 id="comparison-with-null">Comparison with null</h3>
<p>For comparison expressions with <code>null</code> as argument it is more efficient to use the triple (not) equals operator <code>===</code> and <code>!==</code> instead of <code>==</code> and <code>!=</code>. While the “normal” operators will result in a call of <code>Objects.equal</code>, the triple equals operator can perform a direct comparison.</p>
<p><img src="/Xtext/images/releasenotes/2_11_xbase-compare-null-gen.png" alt="" /></p>
<p>For these situations <a href="">a warning is produced</a> and <a href="">a quickfix is offered</a>.</p>
<p><img src="/Xtext/images/releasenotes/2_11_xbase-compare-null-quickfix.png" alt="" /></p>
<h2 id="xtext-project-wizard">Xtext Project Wizard</h2>
<h3 id="usability">Usability</h3>
<p>We have examined the user experience with the New Xtext Project wizard and improved it with the input we gained from users. It was possible to enter invalid values for <a href="">project names</a> and <a href="">file extensions</a>, this is now checked.</p>
<p>An usability test of the advanced configuration page revealed that especially less experienced users could had <a href="">issues with the dependencies between options</a>. From different proposals it turned out best from the user’s perspective if mandatory options are automatically selected and disable. Further an information message is presented to the user about this action. The ‘Generic IDE Support’ option gets an additional information hover.</p>
<p><img src="/Xtext/images/releasenotes/2_11_project-wizard-autoselect.png" alt="" /></p>
<p>The wizard’s text messages have been revised and <a href="">made consistent</a>.</p>
<h3 id="line-delimiter">Line Delimiter</h3>
<p>The Xtext project wizard now <a href="">considers the workspace default line delimiter</a> and configures the generated MWE2 workflow accordingly. As a result the artifacts produced by the Xtext generator will use the same line delimiter explicitly.</p>
<h3 id="tycho-build-configuration">Tycho Build Configuration</h3>
<p>For projects that are created with Eclipse plug-in and Maven as build system, the generated target definition is upgraded to <a href="">use the Eclipse Neon repository</a>. Eclipse Tycho is <a href="">configured with version 0.25.0</a> now.</p>
<h2 id="example-projects">Example Projects</h2>
<p>The provided example projects have been revised and use the new generator workflow, new project structure and new testing modules.</p>
<h2 id="deprecated-components">Deprecated Components</h2>
<h3 id="old-xtext-generator">Old Xtext Generator</h3>
<p>With Xtext 2.9 a <a href="/Xtext/releasenotes.html#/releasenotes/2015/11/16/version-2-9-0">new generator infrastructure was introduced</a>. In favor of this new generator <a href="">the old generator has been deprecated</a>. Bugfixes will be done primarily for the new generator and most of them will not be backported, thus it is highly recommended to migrate your languages’ <code>.mwe2</code> workflows to use the new <a href=""><code>org.eclipse.xtext.xtext.XtextGenerator</code></a> component.</p>
<h3 id="running-the-language-generator-from-maven">Running the Language Generator from Maven</h3>
<p>The Maven POM module <a href="">org.eclipse.xtext.xtext</a>, which has been deprecated since 2015, is no longer published. If you use the old generator component, you should replace the <code>org.eclipse.xtext.xtext</code> dependency according to the <a href="">dependencies of that module</a>. The new generator component requires much fewer dependencies; a suitable configuration for it can be obtained by creating a new Maven project with the Xtext project wizard.</p>
<h2 id="fixed-bugs">Fixed Bugs</h2>
<h3 id="closed-memory-leaks">Closed Memory Leaks</h3>
<p>The memory leak affected editors and <a href="">downgraded performance while editing</a> resources for which JVM types are inferred (including Xtend).</p>
<p>A second leak affected the <a href="">Syntax Graph View</a> and slowed down the IDE.</p>
<h3 id="performance">Performance</h3>
<p>The Serializer was <a href="">performing poor</a> for certain grammars. This has been fixed.</p>
<h3 id="bug-lists">Bug Lists</h3>
<p>In addition to the restructuring and the LSP support many bugs have been fixed:</p>
<p><a href=";bug_status=VERIFIED&amp;bug_status=CLOSED&amp;chfield=resolution&amp;chfieldfrom=2016-06-22&amp;chfieldto=2017-01-24&amp;classification=Modeling&amp;classification=Tools&amp;columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cresolution%2Cshort_desc%2Cchangeddate%2Ckeywords&amp;f0=OP&amp;f1=OP&amp;f3=CP&amp;f4=CP&amp;known_name=Xtext%202.11&amp;list_id=15601548&amp;product=TMF&amp;product=Xtend&amp;query_based_on=Xtext%202.11&amp;query_format=advanced&amp;resolution=FIXED">Fixed Eclipse Bugzilla tickets</a></p>
<p><a href=";q=is%3Aissue+milestone%3Arelease_v2.11+is%3Aclosed+repo%3Aeclipse%2Fxtext+repo%3Aeclipse%2Fxtext-core+repo%3Aeclipse%2Fxtext-lib+repo%3Aeclipse%2Fxtext-extras+repo%3Aeclipse%2Fxtext-eclipse+repo%3Aeclipse%2Fxtext-idea+repo%3Aeclipse%2Fxtext-web+repo%3Aeclipse%2Fxtext-maven+repo%3Aeclipse%2Fxtext-xtend&amp;type=Issues&amp;ref=searchresults">Fixed GitHub issues</a></p>
<p><a href=";q=is%3Apr+milestone%3Arelease_v2.11+is%3Aclosed+repo%3Aeclipse%2Fxtext+repo%3Aeclipse%2Fxtext-core+repo%3Aeclipse%2Fxtext-lib+repo%3Aeclipse%2Fxtext-extras+repo%3Aeclipse%2Fxtext-eclipse+repo%3Aeclipse%2Fxtext-idea+repo%3Aeclipse%2Fxtext-web+repo%3Aeclipse%2Fxtext-maven+repo%3Aeclipse%2Fxtext-xtend&amp;type=Issues&amp;ref=searchresults">Closed Pull Requests</a></p>
<footer class="site-footer">
<div id="extra">
<div class="inner">
<div class="container">
<div class="row">
<div class="span6">
<h3 class="footer-links-header">Quick Links</h3>
<ul class="footer-links clearfix">
<li><a href="">Privacy Policy</a></li>
<li><a href="">Terms of Use</a></li>
<li><a href="">Copyright Agent</a></li>
<li><a href="">Legal</a></li>
<ul class="footer-links clearfix">
<li><a href="">Eclipse Home</a></li>
<li><a href="">Market Place</a></li>
<li><a href="">Eclipse Planet</a></li>
<li><a href="">Xtext Forum</a></li>
<div class="span6">
<!-- Social Media Links -->
<h3 class="footer-links-header"">Social Media</h3>
<ul class="footer-links clearfix">
<a href=""><img src="/Xtext/images/Twitter-bird-darkgray.png" class="img-responsive" style="margin-right: 5px;height: 1em;" alt="Twitter icon">@xtext on Twitter</a>
<a href="#" class="scrollup fadeOutRight animated" style="display: none;">ScrollUp</a>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/Xtext/js/jquery-1.11.3.min.js"></script>
<script src="/Xtext/js/bootstrap.min.js"></script>
<script src="/Xtext/js/jquery.easing.1.3.js" type="text/javascript"></script>
<script src="/Xtext/js/jquery.prettyPhoto.js" type="text/javascript"></script>
<script src="/Xtext/js/prettify.js" type="text/javascript"></script>
<script src="/Xtext/js/lang-xtend.js" type="text/javascript"></script>
<script src="/Xtext/js/lang-common.js" type="text/javascript"></script>
<script src="/Xtext/js/custom.js" type="text/javascript"></script>
<!--script src="" async defer></script-->
<!--script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([ '_setAccount', 'UA-2429174-3' ]);
_gaq.push([ '_trackPageview' ]);
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl'
: 'http://www')
+ '';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
<script src="/Xtext/js/coverflow.min.js" type="text/javascript"></script>
$(function() {
active : 1,
visibleAside: 2,
overlap : 0.5,
scale : 0.9,
angle : 20,
trigger : {
"itemfocus" : true,
"swipe" : true,
"mousewheel" : false
$('#coverflow :hidden').toggle();
$(window).resize(function() {