Scripting an IDE for EDSL awareness

Ilya Sergey, Peter Gromov, Dave Clarke, Ilya Sergey, Peter Gromov, Dave Clarke, Peter Gromov, Dave Clarke · Lirias · 2011

Modern dynamic programming languages provide various mechanisms to implement embedded domain-specific languages (EDSLs), usually based on the meta-object protocol or delegation. The main disadvantages of this approach are the difficulty of statically analyzing domain-specific constraints and providing reasonable code navigation in an existing integrated development environment (IDE),even when the IDE is aware of the host language's semantics. In this paper we present GroovyDSL, a flexible framework for describing semantics-based code assistance for custom EDSLs. GroovyDSL is based on the IntelliJ IDEA environment and allows a developer to add new rules to implement EDSL-aware references resolution and smart code completion. We present a fully implemented small language to describe such rules in a natural way for an EDSL, based on the Groovy programming language, abstracting from the IDE's internal language representation.

Read the paper · More papers on PaperTik