| <!DOCTYPE html> |
| <html> |
| |
| <head> |
| <meta charset="UTF-8"> |
| <title>Xtext - Xtext 2.5.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 & 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.5.0 Release Notes</h1> |
| <h4>Dec 11, 2013</h4> |
| <br/> |
| <p> |
| Xtext 2.5.0 includes |
| <a href="https://bugs.eclipse.org/bugs/buglist.cgi?f1=OP&list_id=7722745&f0=OP&status_whiteboard_type=allwordssubstr&f4=CP&query_format=advanced&j1=OR&f3=CP&status_whiteboard=v2.5&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED">more than 100 bug fixes and enhancements</a>. |
| Some of the more important enhancements are : |
| </p> |
| <section id="annotations_2_5" style="padding-top: 68px; margin-top: -68px;"> |
| <h2>Better Maven Support</h2> |
| <p> |
| Xtext 2.5.0 comes with much improved support for integrating Xtext languages and the corresponding code generators in |
| continuous integration builds. All the needed jars are available on Maven central now and we have added a dedicated Maven compiler plug-in that |
| simulates the incremental build in a headless Java Maven build (no Tycho needed!). Please read the <a href="/Xtext/documentation/302_configuration.html#continuous-integration">new section in the documentation</a> for more |
| details on the new Maven support. |
| </p> |
| <pre class="prettyprint xml linenums"> |
| <plugin> |
| <groupId>org.eclipse.xtext</groupId> |
| <artifactId>xtext-maven-plugin</artifactId> |
| <version>2.5.0</version> |
| <executions> |
| <execution> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <languages> |
| <language> |
| <setup>my.mavenized.HeroLanguageStandaloneSetup</setup> |
| <outputConfigurations> |
| <outputConfiguration> |
| <outputDirectory>src/main/generated-sources/xtend/</outputDirectory> |
| </outputConfiguration> |
| </outputConfigurations> |
| </language> |
| </languages> |
| </configuration> |
| <dependencies> |
| <dependency> |
| <groupId>my.mavenized.herolanguage</groupId> |
| <artifactId>my.mavenized.herolanguage</artifactId> |
| <version>1.0.0-SNAPSHOT</version> |
| </dependency> |
| </dependencies> |
| </plugin> |
| </pre> |
| </section> |
| <section id="compilerchecks" style="padding-top: 68px; margin-top: -68px;"> |
| <h2>Enhancements for Xbase</h2> |
| <p> |
| The Xbase language and compiler has been improved in many ways. |
| </p> |
| <h3>Full support for Annotations</h3> |
| <p> |
| Xbase now supports all annotation values and constant expressions in annotations. |
| </p> |
| <pre class="prettyprint lang-xtend linenums"> |
| class MyEntity { |
| @Columns(#[@Column('id'), @Column(value = 'timestamp', length = 2 * 3 * 7)]) |
| CompositeKey key |
| } |
| </pre> |
| <h3 id="ambiguous_methods">Method overload validation</h3> |
| <p> |
| Ambiguous method invocations are checked and reported with a detailled message. |
| The compiler optionally detects valid but suspiciously overloaded methods |
| that could be implemented by accident. This is especially handy when property access and |
| extension methods come into play. |
| </p> |
| <p> |
| Here's an example how it is used within Xtend. |
| </p> |
| <pre class="prettyprint lang-xtend linenums"> |
| class A { |
| def isCheck() {..} |
| } |
| class B extends A { |
| def m() { |
| /* |
| * Ambiguous feature call. |
| * The methods |
| * getCheck() in B and |
| * isCheck() in A |
| * both match. |
| */ |
| this.check |
| } |
| def getCheck() {..} |
| } |
| </pre> |
| <em>Important note:</em> |
| <p> |
| You have to make sure to use the library in version 2.5 along with the introduced compiler checks. |
| </p> |
| <h3 id="discouraged_variable_names">Discouraged variable names</h3> |
| <p> |
| Some variable names are used implicitely by Xtend, for example the variable name 'self'. |
| The compiler optionally reports if these names were picked manually. |
| </p> |
| <h3 id="improved_auto_casts">Auto casts</h3> |
| <p> |
| Xbase supported auto-casts right from the beginning with its powerful switch expression. |
| In 2.5, the more familiar syntax with instance-of checks caught up and also applies automatic |
| casts in if expressions and while loops. |
| </p> |
| <pre class="prettyprint lang-xtend linenums"> |
| if (c instanceof String) { |
| c.substring(42) |
| } |
| </pre> |
| <h3 id="switch_enum">Switch over enums</h3> |
| <p> |
| One of the few places where Xbase's syntax could be improved compared to Java, was a switch expression |
| over enumeration values. Now it's no longer necessary to use a qualified name or static imports for the enum values but |
| the literals are available automatically for the case guards. |
| </p> |
| <pre class="prettyprint lang-xtend linenums"> |
| switch p { |
| case CLASS: 1 |
| case RUNTIME: 2 |
| case SOURCE: 3 |
| } |
| </pre> |
| <h3>Improved type inference with primitive values</h3> |
| <p> |
| The local type inference has been improved when primitive types are involved. Their wrapper |
| types will be used in fewer cases which prevents unexpected exceptions at runtime. |
| An optional compiler check can point to places where primitive defaults are used rather than |
| explicit values. |
| </p> |
| </section> |
| |
| </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://live.eclipse.org/">Eclipse Live</a></li> |
| <li><a href="http://www.planeteclipse.org/">Eclipse Planet</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> |