1. Features


Multi-platform

Based on the popular Eclipse environment and available to Windows, Linux and Mac OS.

Friendly environment

Integrated function to work with Xtext projects in Eclipse IDE.

Support and updates

The application is currently in development for this reason updates and upgrades are common.

Focused

The application is simple to use and focuses on its unique goal to not confuse users.



2. Setup manual


Previous requirements

1. Download and install JDK 8 (Java Development Kit) or an previous version.

To download the JDK 8 or an previous version you can access Oracle's official website:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


2. Download and install Maven 3.3.

To download Maven 3.3 you can access Apache Maven Project official website:

https://maven.apache.org/download.cgi


3. Download the Eclipse Modeling Tools version.

To download the Eclipse Modeling Tools version you can access Eclipse official website:

http://www.eclipse.org/downloads/packages/eclipse-modeling-tools/neonr


4. Donwload SonarQube server 6.0.

To download SonarQube server 6.0 you can access SonarQube official website:

http://www.sonarqube.org/downloads/


5. Donwload SonarQube Runner 2.4.

To download SonarQube Runner 2.4 you can access SonarQube official website:

http://docs.sonarqube.org/display/SONARQUBE45/Installing+and+Configuring+SonarQube+Runner

Installing Xtext2Sonar plug-in

1. Finally, you must copy all .jar files related to the plug-in Xtext2Sonar in the plugins directory. This directory is within Eclipse directory that is obtained after installation.


To download the Xtext2Sonar plug-in click on the section "Download plug-in for Eclipse" or click here.



3. User's guide


Performing transformation

1. First, you must open the Eclipse version with Xtext2Sonar plugin integrated.

2. Later, you must add the following sentence in the .mwe2 file of your Xtext project:

3. After performing the previous step and run the .mwe2 file, we get a new .xmi file in the src-gen project folder.

4. Then, we right click the .xml file and choose the "Xtext2Sonar > Generate SonarQube Plugin" option.

5. Later, we will get 5 new projects in our Eclipse workspace.

6. Initially, the projects contain compilation errors because Maven dependencies are not downloaded properly, to fix them we should right-click on any of them and select the "Maven> Update project" option.

7. Then we must go to the Eclipse workspace and we must copy the projects: -plugin, -toolkit, -checks and -squid within the remaining project. Then, from the terminal we place ourselves in the project that contains the others and perform the "mvn package" command. This command will generate a .jar file within the target folder of -plugin project.

Testing the SonarQube plug-in

1. Subsequently, we must copy the .jar file obtained in the SonarQube "plugins" folder (for example: /sonarqube-5.0.1/extensions/plugins/).

2. Then, from the terminal, we must launch the SonarQube server using the "sh sonar.sh start" command (/sonarqube-5.0.1/bin/YourOS/sonar.sh). And then, we must execute the "sonar-runner" command in the project directory we want to analyze. In this case, we will analyze a file corresponding to DSL plugin that has been used as evidence for transformation.

3. Finally, accessing localhost:9000, we can visualize the SonarQube web interface and observe the results of the project analyzed.



4. Developer's guide


Works with Xtext2Sonar

1. Clone the GitHub repository of Xtext2Sonar.

To clone the GitHub repository you can access: https://github.com/TatyPerson/Xtext2Sonar (git clone https://github.com/TatyPerson/Xtext2Sonar.git)


2. Modify the generator of the SonarQube plug-in architecture (launcher project).

In this case, you must work with "Xtext2SonarM2T.launcher" project. The class that performs the generation of the structure is "AcceleoGenerateGenerateSonarQubePluginAction.java".


3. Modify the transformer of the Xtext grammar to SonarQube grammar.

In this case, you must work with "Xtext2SonarM2T" project. The main file that performs the conversion of the grammar is "generateSonarGrammar.mtl". This file is a Acceleo module and you must follow the Acceleo sintax (https://wiki.eclipse.org/Acceleo/Getting_Started).



5. Case study


Quality Algorithms scenario

The main objective of this case study is to explore how the automatic computation of metrics for analysing the quality of the algorithms written with the Vary tool can help a teacher to assess the student programming assignments. This study enables to discover insights and generate ideas for new research. The experience was conducted in the context of the subject Introduction to Programming in the Degree in Computer Engineering at University of Cádiz. In this case, a group of students was requested to develop an algorithm inpseudocode for solving a given problem. The problem consists in summing the odd numbers between 1 and a number provided by the user.


Quality Music Sheet Composition scenario

This usability test is aimed at finding out how the automatic computation of metrics for analysing the quality of music sheets written with the Lilypond notation is suitable for musicians. In order to obtain significant results, the study was conducted on a set of experts in the music domain, from musicologists to performers. All of them are previously screened to ensure they are accustomed to computer-aided sheetmusic design tools, particularly Lilypond.



6. About Xtext2Sonar Project


Project

The Xtext framework (https://eclipse.org/Xtext/) enables the development of domain-specific languages (DSL) applied to any area. The syntax of these languages (grammar) is a new language, such as C, C ++ or Java, for example. Therefore, it would be interesting to measure the quality of implementation performed with this new language. The SonarQube static analysis of code platform (http://www.sonarqube.org) allows you to add new plug-ins that define new languages to be analyzed. Therefore, the goal of this project is to perform a transformation of grammar implemented in Xtext to the expected SonarQube grammar and expediting the development process of the plug-ins for this platform.

Related papers

Team

Licence

This project licence is Eclipse Public License (EPL-1.0).