A DSL case Study with Java imports implemented in TypeScript

Subscribers:
24,000
Published on ● Video Link: https://www.youtube.com/watch?v=FD1p7dPHiIw



Duration: 33:22
70 views
0


Presented at EclipseCon 2023 in Ludwigsburg, Germany by Insa Fuhrmann (TypeFox GmbH) and Dennis Huebner (TypeFox GmbH).

Eclipse Langium is an open source language engineering tool written in TypeScript and running in Node.js. Thus, it is the perfect choice for developing Domain-Specific Languages (DSLs) within Eclipse Theia or web applications without any breaks in the toolstack. But what if you wanted to develop your DSL in TypeScript, while still allowing it to import, extend, and utilize the power of Java libraries and your own custom Java classes?

In this talk we show you how this can be done and we also introduce you to an open source real world example.

Firstly, we cover the implementation of the technical connection between Java and TypeScript. Here, we also explain how to support a custom classpath configuration in case you need to specify file areas to scan for your Java classes.

Then you will learn about solutions for the challenges concerning the integration of Java and DSLs. They can arise for example from differing type systems, method overloading, the handling of qualified names and similar DSL syntax, case sensitivity meeting case insensitivity, linking for implicit Java imports, harmonizing scope handling, inheritance rules, and instantiation. We show you an open source project from an industrial context that has posed all these challenges and was supported with the Langium framework.