blob: c43a0f2a62c7c5cb414b28cf3fea0052e69b6b66 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Xtext - Xtext 2.14.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="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- 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'>
<![endif]-->
<!-- BEGIN Cookie Consent
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"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": "http://www.eclipse.org/legal/privacy.php"
}
})});
</script>
END Cookie Consent -->
</head>
<body>
<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="https://www.itemis.com/en/xtext/support-and-team/" target="_blank">itemis</a></li>
<li><a href="https://typefox.io/trainings-2" target="_blank">TypeFox</a></li>
</ul>
</li>
<li ><a href="http://xtend-lang.org">Xtend</a></li>
</ul>
<!--div class="nav pull-right">
<li ><a><iframe src="https://ghbtns.com/github-btn.html?user=eclipse&repo=xtext&type=star&count=true" frameborder="0" scrolling="0" width="170px" height="20px"></iframe></a></li>
</div-->
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<!-- Navbar End -->
</header>
<div class="page-content">
<div class="wrapper">
<div id="page">
<div class="inner">
<br/><br/>
<div id="maincontainer" class="container">
<div class="span8 offset1">
<h1>Xtext 2.14.0 Release Notes</h1>
<h4>May 23, 2018</h4>
<br/>
<p>While the Xtext project has paid more attention on bug fixing for the past release, Xtext 2.14 is bringing a whole bunch of new features. This version is part of the Eclipse Photon (4.8) simultaneous release. An important focus was to keep up with the fast development pace of important technologies that Xtext is building on. Since its past release, Java 9 and 10 came out. Build technologies like Maven Tycho and Gradle were changed to support that, too. The Language Server Protocol is evolving rapidly. JUnit 5 is adopted by IDEs and build systems. And Xtext is now ready for all of them!</p>
<h2 id="java-9-and-10-support">Java 9 and 10 Support</h2>
<p>Xtext and Xtend 2.14 are able to compile with and against Java 9 &amp; 10. Here are a few notes on the support</p>
<ul>
<li>There is no native support for Java 9/10 module visibilities but we fall back to jdt/javac on that topic.</li>
<li>A current Maven version is required (tested with 3.5)</li>
<li>When using Gradle, version 4.7 is required at least. The wizard will create projects accordingly.</li>
<li>Java 9 requires Tycho 1.1 or newer, Java 10 requires Tycho 1.2</li>
<li>Java 9 requires Oxygen.1a at least, Java 10 requires Oxygen.3a. Eclipse Photon works fine for both.</li>
<li>Java 10 requires the org.objectweb.asm library in version 6.1.1</li>
</ul>
<p>For upgrading existing project use the New Project Wizard to create a project with the desired settings and compare build relevant files (MANIFEST.MF, build.gradle, pom.xml, *.target) with the existing projects.</p>
<h2 id="junit-5-support">JUnit 5 Support</h2>
<p>Xtext now supports the JUnit 5 framework for writing tests. JUnit 5.1 or newer is required.</p>
<p>For new projects the project wizard’s advanced page allows to select the desired JUnit version.</p>
<p><img src="/Xtext/images/releasenotes/2_14_wizard_junit5.gif" alt="" /></p>
<p>Created test projects directly only depend on the JUnit 5 API artifact</p>
<pre><code>org.junit.jupiter:junit-jupiter-api:5.0.0
</code></pre>
<p>Additional dependencies are configured by the JUnit Library container. This lowers the coupling to concrete JUnit versions and the test engine used. For example, Eclipse Photon is using JUnit 5.1, while Eclipse Oxygen is using JUnit 5.0. Furthermore, the execution of tests in build systems is using the test engines provided by the build system’s test plugins.</p>
<h2 id="new-grammar-annotations">New Grammar Annotations</h2>
<p>The Xtext Grammar language supports the following additional annotations for parser rules:</p>
<h3 id="deprecated">@Deprecated</h3>
<p><img src="/Xtext/images/releasenotes/2_14_annotation_deprecated.png" alt="" /></p>
<p>This annotation marks a rule to be deprecated. Issue markers with are produced where a deprecated rule is used. By default the severity of issue is <em>Warning</em>. The severity level can be configured in the preferences. This feature will help you to do smooth langauage evolution of the time by informing your users about deprecated parts.</p>
<p><img src="/Xtext/images/releasenotes/2_14_annotation_preference.png" alt="" /></p>
<h3 id="final">@Final</h3>
<p><img src="/Xtext/images/releasenotes/2_14_annotation_final.png" alt="" /></p>
<p>A rule marked with <code>@Final</code> cannot be overridden.</p>
<h3 id="exported">@Exported</h3>
<p>As a default Xtext exports all elements to the index that have a name. For customizing this behaviour you need to create a custom IDefaultResourceDescriptionStrategy manually.<br />
With <code>@Exported</code> it can be customized on grammar level, which element types are exported to the index. The customization takes effect when at least one rule in a grammar is annotated with <code>@Exported</code>. By doing that you can easily manage visibility of elements and safe memory.</p>
<h2 id="eclipse-integration">Eclipse Integration</h2>
<h3 id="create-action-quickfix">Create Action Quickfix</h3>
<p>Rules that can be consumed without object instantiation usually require a <em>Create Action</em>. A typical example is when a rule defines an optional assignment. Xtext reports this as a warning in the grammar file.</p>
<p>For problems of this kind a new <em>quickfix</em> has been added that inserts the <em>Create Action</em> at the proper place of the parser rule.</p>
<p><img src="/Xtext/images/releasenotes/2_14_create-action.gif" alt="" /></p>
<h3 id="code-mining-support">Code Mining Support</h3>
<p>Eclipse Photon (4.8) adds a new API called <em>Code Mining</em>. With it text editors can inline additional semantic information into the text, which is not part of the text itself. A useful example to leverage this is to display names of inferred types, parameter names of a called function etc.</p>
<p>Xtext adds a new bundle <code>org.eclipse.xtext.ui.codemining</code> which is offering an API for usage of Code Mining with Xtext. The code generator fragment <code>org.eclipse.xtext.xtext.generator.ui.codemining.CodeMiningFragment</code> can be added to the generator workflow to create a stub implementation and provide all dependencies and bindings for the use of this API.</p>
<p>An example implementation has been added to the Domainmodel Example DSL. To learn more about the usage of this API install the example from the File menu and look up the <code>DomainmodelCodeMiningProvider</code> class.</p>
<p><img src="/Xtext/images/releasenotes/2_14_domainmodel-codemining.gif" alt="" /></p>
<h3 id="new-project-and-file-wizard">New Project and File Wizard</h3>
<p>With two simple switches you can turn on the generation of a New Project Wizard and a New File Wizard for your language.</p>
<p>These wizards are based on flexible templates to generate one or many projects with any number of files. You can enable the generation from your .mwe2 file with two simple switches:</p>
<pre><code>language = StandardLanguage {
name = "org.xtext.example.mydsl.MyDsl"
fileExtensions = "mydsl"
fileWizard = {
generate = true
}
projectWizard = {
generate = true
}
}
</code></pre>
<p>The wizard to create projects allows to select from a number of templates and creates one or, in certain situations helpful, even many projects.</p>
<p><img src="/Xtext/images/releasenotes/2_14_new-file-wizard.png" alt="" /></p>
<p>The wizard to create files is more simple in its basic form and skips the template selection if there is only one file template.</p>
<p><img src="/Xtext/images/releasenotes/2_14_new-project-wizard-template-selection.png" alt="" /></p>
<p>In case there are many templates the wizard gets a second page to configure the parameter whereas on the first page a combo box to select the template appears.</p>
<p>The UI for the parameters of the templates as well as the templates them self are defined in code with a concise API. You do not need to fiddle around with SWT widgets and get most UI stuff for free. The templates are generated in the UI project of your language. You can adapt the generated templates, add new ones or contribute new template providers through extension points.</p>
<p>If you generate the wizards for an existing project the <code>plugin.xml</code> is not regenerated to not risk loosing manual changes you might have applied. Instead a <code>plugin.xml_gen</code> is created. You have to merge the generated extensions to your <code>plugin.xml</code> manually.</p>
<h3 id="console-icon">Console Icon</h3>
<p>The Xtext icon has been added for the Xtext console:</p>
<p><img src="/Xtext/images/releasenotes/2_14_console-icon.png" alt="" /></p>
<h2 id="language-server-support">Language Server Support</h2>
<p>Xtext has been upgraded to LSP4J version 0.4.0. This includes the following features:</p>
<ul>
<li>Implementation of the Language Server Protocol 3.7.0</li>
<li>Implementation of the VS Code Debug Protocol 1.25.0</li>
<li>Support multiple local and remote services</li>
<li>Improved error handling</li>
</ul>
<h2 id="emf-support">EMF Support</h2>
<p>With EMF 2.14 a new registry <code>EAnnotationValidator.Registry.INSTANCE</code>, which had to be considered in Xtext’s testing support for resetting.</p>
<p>EMF 2.8 <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=367569#c7">introduced</a> the concept <code>ResourceLocator</code> in <code>ResourceSet</code>s. Xtext’s specialized implementation <code>XtextResourceSet</code> did not support that so far and has been extended now.</p>
<h2 id="change-serializer--rename-refactoring">Change Serializer &amp; Rename Refactoring</h2>
<p>The past <a href="/Xtext/releasenotes.html#/releasenotes/2017/10/20/version-2-13-0">release 2.13</a> introduced a new API for EMF Model Manipulation and an improved rename refactoring based on the new <code>IChangeSerializer</code> API.</p>
<p>These new features are still incubating. Several issues that were identified by the adoption of the features have been solved.</p>
<h2 id="performance">Performance</h2>
<h3 id="output-configurations-cache">Output Configurations Cache</h3>
<p>A performance bottleneck was <a href="https://github.com/eclipse/xtext-eclipse/issues/535">discovered</a> in the access to <code>IOutputConfiguration</code>s in builder participants. The problem depends on the amount of files produced by code generators.</p>
<p>A cache was introduced in class <code>BuilderParticipant</code> to solve the issue.</p>
<h3 id="semantic-highlighting">Semantic Highlighting</h3>
<p>Computation of semantic highlighting <a href="https://github.com/eclipse/xtext-eclipse/issues/347">was performed twice</a>. This was fixed and should improve editing experience especially for larger files with intensive use of semantic highlighting, for example like the Xtend language.</p>
<h3 id="queuedbuilddata">QueuedBuildData</h3>
<p>A bottleneck in class <code>QueuedBuildData</code> has been <a href="https://github.com/eclipse/xtext-eclipse/issues/40">found</a> that affects the build time for a large number of resources. The build time has been improved for this scenario.</p>
<h2 id="execution-environment">Execution Environment</h2>
<p>Xtext 2.14 comes with the following requirements for the execution environment:</p>
<ul>
<li>Java: 1.8, 9 or 10</li>
<li>Eclipse Luna (4.4) or newer</li>
<li>EMF 2.10 or newer</li>
<li>Guice 3.0</li>
<li>Tycho 1.1, 1.2 (Java 10 or JUnit 5)</li>
<li>JUnit 4.12 or 5.1</li>
</ul>
<p>Note that bundle <code>org.eclipse.xtext.xbase.lib</code> was compiled with Java 1.8 now, while being compatible to 1.6 in earlier versions.</p>
<h2 id="links">Links</h2>
<p>More detailed information on some topics have been written in blog posts:</p>
<ul>
<li><a href="https://blogs.itemis.com/en/xtext-2.14-adds-support-for-junit-5">“Xtext 2.14 adds support for JUnit 5”</a></li>
<li><a href="https://blogs.itemis.com/en/code-mining-support-in-xtext">“Code Mining Support in Xtext”</a></li>
<li><a href="https://blogs.itemis.com/en/generating-a-new-project-wizard-with-xtext-2.14">“Generating a new project wizard with Xtext 2.14”</a></li>
<li><a href="https://blogs.itemis.com/en/new-file-wizard-easy-to-generate-with-xtext-2.14">“New File Wizard – easy to generate with Xtext 2.14”</a></li>
<li><a href="https://blogs.itemis.com/de/new-project-wizard-einfach-mit-xtext-2-14-generieren">“New Project Wizard: einfach mit Xtext 2.14 generieren”</a> (German)</li>
<li><a href="https://blogs.itemis.com/de/new-file-wizard-einfach-mit-xtext-2.14-generieren">“Erzeugen des New File Wizards”</a> (German)</li>
<li><a href="https://github.com/eclipse/lsp4j/blob/master/CHANGELOG.md">LSP4J Changelog</a></li>
</ul>
<h2 id="fixed-issues">Fixed Issues</h2>
<p>As in every release we are eagerly hunting down the bugs, review and integrate lots of contributions. 88 issues, 62 Pull Requests and 60 Bugzilla tickets have made it into this release. For further details please refer to the following lists:</p>
<ul>
<li>
<p><a href="https://github.com/search?utf8=%E2%9C%93&amp;q=is%3Aissue+milestone%3ARelease_2.14+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>
</li>
<li>
<p><a href="https://github.com/search?utf8=%E2%9C%93&amp;q=is%3Apr+milestone%3ARelease_2.14+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>
</li>
<li>
<p><a href="https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;bug_status=CLOSED&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.14&amp;list_id=16618269&amp;product=TMF&amp;product=Xtend&amp;query_based_on=Xtext%202.14&amp;query_format=advanced&amp;status_whiteboard=v2.14&amp;status_whiteboard_type=allwordssubstr">Fixed Eclipse Bugzilla tickets</a></p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<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="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/legal/">Legal</a></li>
</ul>
<ul class="footer-links clearfix">
<li><a href="http://www.eclipse.org">Eclipse Home</a></li>
<li><a href="http://marketplace.eclipse.org/">Market Place</a></li>
<li><a href="http://www.planeteclipse.org/">Eclipse Planet</a></li>
<li><a href="https://www.eclipse.org/forums/index.php/f/27/">Xtext Forum</a></li>
</ul>
</div>
<div class="span6">
<!-- Social Media Links -->
<h3 class="footer-links-header"">Social Media</h3>
<ul class="footer-links clearfix">
<li>
<a href="https://twitter.com/xtext"><img src="/Xtext/images/Twitter-bird-darkgray.png" class="img-responsive" style="margin-right: 5px;height: 1em;" alt="Twitter icon">@xtext on Twitter</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<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="https://apis.google.com/js/platform.js" 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')
+ '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script-->
<script src="/Xtext/js/coverflow.min.js" type="text/javascript"></script>
<script>
$(function() {
$('#coverflow').coverflow({
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() {
$('#coverflow').coverflow();
});
});
</script>
</footer>
</body>
</html>