Installation

To install the DSL Forge, go through the following steps.

Install Eclipse

To know which package is the most appropriate for you, select one of the following alternatives.

  • Eclipse IDE for Java EE Developers

In this scenario, users are interested in having a DSL editor shipped with HTML/JavaScript applications. The generator outputs a static web project ready to be debugged under Eclipse. The most appropriate distribution to use is Eclipse IDE for Java EE Developers as it comes with a simple HTTP Preview server easy to configure.

  • Eclipse for RCP and RAP Developers

If you want a closer integration with Xtext and EMF, or if you want to integrate the editor with other Eclipse components, you’d better install Eclipse for RCP and RAP Developers. This makes it possible to integrate the editor with third party RWT (Remote Widget Toolkit, the web-based SWT) plugins and widgets.

Install the Xtext SDK

Install Xtext Complete SDK from Eclipse update sites:

(Help>Install New Software).

Install DSL Forge Tools

Use the update site https://dslforge.org/downloads/tooling/repository/

Done! Start developing a web front-end for yout DSL!

About Target Platforms

By default, the Eclipse IDE compiles all projects in the workspace against the running platform, sometimes the IDE itself, sometimes not. RAP applications are compiled against the Equinox Basic Target. More info about setting targets can be found at the Eclipse RAP Developers Guide.

There are two ways to set the target: you could either import the base target platform (may contain features you are not interested in, but everything is there to run the examples), or use the  generated target platform.

  • Use the Generated Target Platform

From version 0.9.x, DSL Forge Xtext/RAP Generator generates a target platform per-DSL.

  • Import the Text Editor Demo Target Platform

The easiest way to set the target platform directly from Git repository. Here are the steps:

  1. Clone the repository: git clone https://github.com/plugbee/dslforge.git
  2. Import org.dslforge.runtime.target,
  3. Open the target file (e.g. neon.target) and let P2 do the rest (this may take a while).
  • Compose your own Target

Create a new target definition file and compose the features from P2 repositories: press “Add Software Site” and enter the URLs of the repositories you want, then select the features you are interested in. For example if you are targeting Neon releases, use the following repositories:

Below an example of a target platform which, in addition, uses some of the RAP Incubator components (Tabbed Properties View, Common Navigator), Gemini JPA and EclipseLink for persisting resources metadata.

DSL Forge Base Target

DSL Forge Target Example

Activate the target platform by clicking the link “Set as Target Platform” in the upper right corner of the target editor.

You’re done now, let’s start with a first DSL example!

4 Steps to get your DSL online!

Get the web plugin to package with RAP, a Maven/Tycho project to actually build and package the editor as a web application archive (war), and the target platform on top of which to compile and build the web application. Build the web archive and deploy on Tomcat.

Installation

The current DSL Forge version is based on Eclipse Mars packages. The packages are available under https://www.eclipse.org/downloads/packages/ To know which package is the most appropriate for you, select one of the following alternatives.

Overview

DSL Forge is a framework for the development of domain-specific language (DSL) editors for web applications and cloud IDEs. The framework makes it possible to create and edit models, launch automated tool chains on the server, including model-to-model transformations, code generation, live validation, and execution of the generated artefacts.

Generate Web Editor from Xtext

Generate a RAP editor with both client-side ANTLR Parser, and Xtext runtime features in the back-end. The Xtext/RAP Generator option produces an Eclipse plugin with the suffix “.web”. To compile the plugin, don’t forget to switch the target platform to RAP.

Generate Web Editor from ANTLR

The Generator takes as input an Xtext grammar, generates JavaScript parser and lexer, and does the wiring with an ACE Editor. As Xtext takes a subset of ANTLR while adding the integration layer for EMF, the generator ignores the extra info, and extracts the ANTLR grammar to generate the “.g” file.

Customize the Web editor

The generated code contains Java classes and JavaScript sripts; both artefacts can be customized according the developer's needs. Below some hints on how to customize the generated editors, for more advanced customizations, feel free contact the support.