Abstract
This paper introduces a novel infrastructure that extends the Language Server Protocol (LSP) to support graphical modeling editors. By utilizing a custom Intermediate Representation Format (IRF) and the Eclipse Modeling Framework (EMF), the authors enable the creation of decoupled, web-deployable graphical editors. In this architecture, a generic web client manages the visual rendering while a specialized server handles complex modeling logic, constraints, and lifecycle management. This approach allows for the development of sophisticated modeling tools that are as portable and accessible as modern web applications.
Introduction
The development of modern Integrated Development Environments (IDEs) has historically been a monolithic endeavor, where the user interface and language-specific logic are tightly coupled. The Language Server Protocol (LSP) revolutionized this field for textual languages by standardizing the communication between editors (clients) and language smarts (servers). However, graphical modeling languages—which rely on spatial data like nodes and edges rather than linear text—have lacked a similar standardized, decoupled infrastructure. This paper proposes a solution to bridge this gap, enabling lightweight, web-based graphical modeling tools that leverage the power of the Eclipse Modeling Framework (EMF).
System Architecture
The proposed system architecture is designed to overcome the limitations of monolithic modeling tools by dividing the editor into three primary components: a generic web client, an EMF-based language server, and a communication layer based on LSP.
As shown in the architecture diagram, the Generic Client is a web application built using standard technologies (HTML, CSS, SVG, and JavaScript) and the JointJS library. It remains language-agnostic, meaning it does not contain any specific modeling logic. Instead, it renders diagrams based on SVG templates and data provided by the server. The Graphical Language Server is built using LSP4J and leverages EMF to manage the model's abstract syntax, perform validations, and generate the necessary visual templates. Communication occurs over standard LSP messages, mapping graphical operations like moving a node to LSP synchronization events.
The Intermediate Representation Format (IRF)
Central to this infrastructure is the Intermediate Representation Format (IRF). Since standard LSP is designed for text—thinking in terms of characters and lines—the IRF acts as a bridge by encoding graphical information into a JSON format that the protocol can synchronize.
The IRF captures two critical aspects of a model in a single package:
- Abstract Syntax: The semantic data of the model, such as entity names and relationships (e.g., identifying a node as a "Member" named "Julio").
- Concrete Syntax: The visual representation, including spatial coordinates, dimensions, and styling (e.g., placing "Julio" in a box at specific x and y coordinates).
By treating the IRF as a "text document" within the LSP framework, the system can reuse existing synchronization messages to maintain consistency between the client's visual canvas and the server's internal EMF model.
Evaluation and Results
The authors validated their approach using a "Family" modeling language prototype. In this proof-of-concept, the server managed the family hierarchy and constraints, while the web client rendered the resulting diagram. The evaluation demonstrated that LSP can indeed support graphical editors without requiring modifications to the core protocol. This decoupling allows for a highly responsive user interface that is free from the heavy dependencies of the EMF framework, making it truly web-deployable and scalable.
Conclusion and Future Work
While the current implementation proves the feasibility of an LSP-based graphical modeling infrastructure, several challenges remain. Future work will focus on addressing performance bottlenecks by implementing incremental model updates rather than synchronizing the entire state. Additionally, the authors aim to automate the generation of these language servers directly from existing Domain-Specific Language (DSL) definitions, further reducing the development effort required to bring complex modeling tools to the web.
Summary updated