Skip to content

Commit

Permalink
Merge pull request #1619 from eclipse/website-master
Browse files Browse the repository at this point in the history
Website master
  • Loading branch information
NicoPrediger authored Dec 2, 2019
2 parents 146acbd + 39b4288 commit 91c8c67
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 95 deletions.
48 changes: 48 additions & 0 deletions xtend-website/_posts/releasenotes/2019-12-03-version-2-20-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
layout: post
title: Xtend 2.20.0 Release Notes
date: 2019-12-03
categories: releasenotes
published: true
---

Xtend 2.20.0 is mainly a maintenance release with a small number of usability improvements

## Eclipse Integration

### New Refactoring: Import Static Method and Import Static Extension Method

Two refactoring commands have been added which can add as static or static __extension__ import the selected static method call and update all the occurrences in the document. The refactoring commands can be triggered from the `Refactoring > Import Static | Import Static Extension` context menu in the Xtend editor or using `M1+Shift+M` and `M1+Shift+Alt+M` key shortcuts. ([#751](https://github.com/eclipse/xtext-xtend/issues/751))

![Refactoring: Import Static Method]({{site.baseurl}}/images/releasenotes/2_20_refactoring_import_static_method.gif){:height="50%" width="50%"}

### Improved JUnit test case recognition/execution

The Xtend IDE has been improved to recognize and execute all JUnit test cases (implemented in Xtend) event if the cursor is currently located before/after the test class definition.

### New Quick Fix: Add JUnit 4 or 5 to the classpath

A quick fix was added which adds the necessary libraries for JUnit 4 or 5 to the classpath. The quick fix will show on import errors starting with `org.junit.jupiter` (for JUnit 5) or `org.junit` (for JUnit 4). It works both for plug-in projects and regular Java projects. ([#919](https://github.com/eclipse/xtext-xtend/issues/919)

![Quick Fix: Add JUnit 4 to Classpath]({{site.baseurl}}/images/releasenotes/2_20_quickfix_add_junit4_classpath.gif){:height="50%" width="50%"}
![Quick Fix: Add JUnit 5 to Classpath]({{site.baseurl}}/images/releasenotes/2_20_quickfix_add_junit5_classpath.gif){:height="50%" width="50%"}

## Credits

The Xtend Language project is thankful for the dedication of each committer and contributor. This release has been made possible by the following persons (in order of the number of contributed commits to this release):

- Christian Dietrich (itemis)
- Sebastian Zarnekow (itemis)
- Karsten Thoms (itemis)
- Tamas Miklossy (itemis)
- Vivien Jovet (TORO Limited)

## Fixed Issues

As in every release cycle we were eagerly hunting down bugs, and reviewed and integrated plenty of contributions. For further details please refer to the following lists:

* [Fixed GitHub issues](https://github.com/search?q=is%3Aissue+milestone%3ARelease_2.20+is%3Aclosed+repo%3Aeclipse%2Fxtext-xtend&type=Issues)

* [Closed Pull Requests](https://github.com/search?q=is%3Apr+milestone%3ARelease_2.20+is%3Aclosed+repo%3Aeclipse%2Fxtext-xtend&type=Issues)

* [Fixed Eclipse Bugzilla tickets](https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Modeling&classification=Tools&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cresolution%2Cshort_desc%2Cchangeddate%2Ckeywords&f0=OP&f1=OP&f3=CP&f4=CP&known_name=Xtext%202.20&list_id=16618269&product=TMF&product=Xtend&query_based_on=Xtext%202.20&query_format=advanced&status_whiteboard=v2.20&status_whiteboard_type=allwordssubstr)
4 changes: 2 additions & 2 deletions xtend-website/documentation/204_activeannotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ Therefore, careful testing and debugging of the processor is essential. It is be
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.core</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.xtext</groupId>
<artifactId>org.eclipse.xtext.xbase.testing</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
<scope>test</scope>
</dependency>
```
Expand Down
8 changes: 4 additions & 4 deletions xtend-website/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ If you already have a project, you need to add the Xtend library:
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
</dependency>
```

Expand All @@ -62,7 +62,7 @@ and the Xtend compiler plugin:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.19.0</version>
<version>2.20.0</version>
<executions>
<execution>
<goals>
Expand All @@ -84,13 +84,13 @@ Here is a minimal Gradle build script using Xtend:

```groovy
plugins {
id "org.xtext.xtend" version "2.0.7"
id "org.xtext.xtend" version "2.0.8"
}
repositories.jcenter()
dependencies {
compile 'org.eclipse.xtend:org.eclipse.xtend.lib:2.19.0'
compile 'org.eclipse.xtend:org.eclipse.xtend.lib:2.20.0'
}
```

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions xtext-website/_posts/releasenotes/2019-12-03-version-2-20-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
layout: post
title: Xtext 2.20.0 Release Notes
date: 2019-12-03
categories: releasenotes
published: true
---

Xtext 2.20.0 is mainly a maintenance release.

## Eclipse Integration

### EGit minimal version

Xtext requires to use EGit 4.1 or newer now. We have removed a workaround that prevented an endless build loop caused by EGit [Bug#474003](https://bugs.eclipse.org/bugs/show_bug.cgi?id=474003). Since we expect that no clients are still using Xtext >= 2.20 together with the ancient EGit version, we felt safe to finally remove this workaround.

### New Project Wizard / New File Wizard improvements

The `New Project Wizard` / `New File Wizard` generator fragments have been extended by the `generateToolbarButton` option. Setting this option to `true` adds new project wizard / new file wizard buttons to the toolbar. Furthermore, the New Project Wizard templates provide an API to
register images that can be used in the template descriptions. All these wizard improvements are demonstrated by the Statemachine example shipped by the Xtext framework.

## Xtext-Web

The `Xtext-Web Entities Example` provides improved validator and formatter capabilities, such as validating the entity, property and operation names, validating the uniquness of the property/operation definitions as well as properly formatting the defined packages, entities, properties and operations elements.

## Upgrades

* The Eclipse Modeling Workflow Engine (MWE2) was updated to version 2.11.1.
* LSP4J is now on version 0.8.1.
* Maven Tycho was updated to version 1.5.1.
* Gradle to version 5.6.x (Should also work with Gradle 6.0.x which we will ship with Xtext 2.21).
* grgit Gradle Plugin 4.0.0

## Xtend

A word on Xtend. Back in 2013 Xtend was the "Java 10 of today" even before Java 8 was out. Meanwhile Java Release cadence has speeded up and many of Xtends features can be achieved with pure Java, too. There is still some areas where Xtend is particularly advanced like Code generation, Unit tests and lambda heavy APIs like JvmModelInferrer and Formatter. For other tasks there is no need to use Xtend. Also the resources we have no longer allow us to keep the head start against Java. And learning Xtend still is a burden for new Xtext users. To reflect this changed situation we have decided to make Java the default in the wizard again (except e.g. the Generator and a few other APIs). You can still decide if you want Java or Xtend in the workflow.

## Deprecations

### Old Generator

With Xtext 2.9 we changed the way Xtext languages are generated to a new generator infrastructure/workflow (`org.eclipse.xtext.xtext.generator`). Until now we still kept the support for the old (Xpand based) workflows and generator (`org.eclipse.xtext.generator`). We also allowed to use old generator fragments in new workflows through `org.eclipse.xtext.generator.adapter.FragmentAdapter`. As we want to stop using old Xpand in Xtext we will drop this support in a future Xtext release. We strongly recommend you to migrate to the new workflow and to get rid of the usages of `FragmentAdapter`.

### Xtend(1) based IXtext2EcorePostProcessor

Xtext has basically two methods to work with metamodels. The first on is to infer the metamodel from the Grammar. The second one is to maintain it manually and import it in Xtext. In the past we had actually a third option too: To hook into the inference with a `IXtext2EcorePostProcessor` written in old Xtend(1). We plan to drop this feature in the future and recommend you to switch to a manually maintained metamodel.

## Credits

The Xtext project is thankful for the dedication of each committer and contributor. This release has been made possible by the following persons (in order of the number of contributed commits to this release to [all repositories](https://github.com/eclipse/xtext#repositories) except [xtext-xtend](https://github.com/eclipse/xtext-xtend)):

- Christian Dietrich (itemis)
- Karsten Thoms (itemis)
- Sebastian Zarnekow (itemis)
- Tamas Miklossy (itemis)
- D. Gabriel (Bachmann) ![](https://img.shields.io/badge/-first%20time%20contributor-green.svg)
- Jan Köhnlein (TypeFox)
- Arne Deutsch (itemis)
- Mathias Rieder ![](https://img.shields.io/badge/-first%20time%20contributor-green.svg)
- Elena Rogleva ![](https://img.shields.io/badge/-first%20time%20contributor-green.svg)
- Mark Christiaens (Sigasi)
- Simeon Andreev (Advantest) ![](https://img.shields.io/badge/-first%20time%20contributor-green.svg)
- Stéphane Galland (Université de Technologie de Belfort)


## Fixed Issues

As in every release cycle we were eagerly hunting down bugs, and reviewed and integrated plenty of contributions. Almost 60 issues and 320 pull requests have made it into this release. For further details please refer to the following lists:

* [Fixed GitHub issues](https://github.com/search?utf8=%E2%9C%93&q=is%3Aissue+milestone%3ARelease_2.20+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&type=Issues&ref=searchresults)

* [Closed Pull Requests](https://github.com/search?utf8=%E2%9C%93&q=is%3Apr+milestone%3ARelease_2.20+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&type=Issues&ref=searchresults)

* [Fixed Eclipse Bugzilla tickets](https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&classification=Modeling&classification=Tools&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cresolution%2Cshort_desc%2Cchangeddate%2Ckeywords&f0=OP&f1=OP&f3=CP&f4=CP&known_name=Xtext%202.20&list_id=16618269&product=TMF&product=Xtend&query_based_on=Xtext%202.20&query_format=advanced&status_whiteboard=v2.20&status_whiteboard_type=allwordssubstr)
25 changes: 12 additions & 13 deletions xtext-website/documentation/103_domainmodelnextsteps.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,12 @@ One of the main advantages of DSLs is the possibility to statically validate dom
Locate the class *DomainmodelValidator* in the package *org.example.domainmodel.validation* of the language project. Defining the constraint itself is only a matter of a few lines of code:
```xtend
```java
@Check
def void checkNameStartsWithCapital(Entity entity) {
if (!Character.isUpperCase(entity.name.charAt(0))) {
public void checkNameStartsWithCapital(Entity entity) {
if (!Character.isUpperCase(entity.getName().charAt(0))) {
warning("Name should start with a capital",
DomainmodelPackage.Literals.TYPE__NAME)
DomainmodelPackage.Literals.TYPE__NAME);
}
}
```
Expand All @@ -256,16 +256,15 @@ Any name for the method will do. The important thing is the [Check]({{site.src.x

The second validation rule is straight-forward, too. We traverse the inheritance hierarchy of the *Entity* and look for features with equal names.

```xtend
```java
@Check
def void checkFeatureNameIsUnique(Feature f) {
var superEntity = (f.eContainer as Entity).superType
while (superEntity !== null) {
for (other : superEntity.features) {
if (f.name == other.name) {
error("Feature names have to be unique",
DomainmodelPackage.Literals.FEATURE__NAME)
return
public void checkFeatureNameIsUnique(Feature f) {
Entity superEntity = ((Entity) f.eContainer()).getSuperType();
while (superEntity != null) {
for (Feature other : superEntity.getFeatures()) {
if (Objects.equal(f.getName(), other.getName())) {
error("Feature names have to be unique", DomainmodelPackage.Literals.FEATURE__NAME);
return;
}
}
superEntity = superEntity.getSuperType();
Expand Down
Loading

0 comments on commit 91c8c67

Please sign in to comment.