The development of modern IDEs is still a challenging and time-consuming task, which requires implementing the support for language-specific features such as syntax highlighting or validation.
When the IDE targets a graphical language, its development becomes even more complex due to the rendering and manipulation of the graphical notation symbols.
To simplify the development of IDEs, the Language Server Protocol (LSP) proposes a decoupled approach based on language-agnostic clients and language-specific servers.
LSP clients communicate changes to LSP servers, which validate and store language instances.
However, LSP only addresses textual languages (i.e., character as atomic unit) and neglects the support for graphical ones (i.e., nodes/edges as atomic units).
In this paper, we present our vision to decouple graphical language IDEs discussing the alternatives for integrating LSP's ideas in their development. Moreover, we propose a novel LSP infrastructure to simplify the development of new graphical modeling tools, in which Web technologies may be used for editor front-ends while leveraging existing modeling frameworks to build language servers.
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Towards a language server protocol infrastructure for graphical modeling
1. Towards a Language Server Protocol
Infrastructure for Graphical Modeling
Roberto Rodriguez-Echeverria, Javier L. Cánovas, Manuel Wimmer and Jordi Cabot
2. Context
Complex addition of new languages
Complex migration to Web/Mobile
The development of full-fledge
graphical modeling editors is a
challenging and complex task.
3. Context
User experience Language support
Complex addition of new languages
Complex migration to Web/Mobile
The development of full-fledge
graphical modeling editors is a
challenging and complex task.
Two main concerns to consider separately (?)
5. Problem
No scientific assessment or tool provider position on:
LSP provides
enough
expressiveness
for graphical
manipulations
LSP should be
extended to
support specific
features of
graphical
edition
It would be best
to ignore LSP in
graphical
modeling
6. Background: graphical modeling editors
Its development is more complex than textual modeling editors development:
- Atomic unit: char vs node-edge
- Processing: from top-left to bottom-right vs node relationships
- Serialization: raw text vs specific format (e.g. XMI)
9. Background: Language Server Protocol 3.0
Main issue: designed for textual
programming languages
● Text ranges are a basic type
=> making easy for clients to
connect to different LS in a seamless
way, because the protocol is
completely language-agnostic
NotificationMessage {
method : "textDocument/didChange",
params : {
textDocument : {
version : 2
},
contentChanges : [
{ range : {
start : {
line : 21,
character : 6
},
end : {
line : 33,
character : 6
}
}
text : ""
}]}}
10. Challenges
Reducing development and
maintenance costs for
graphical modeling editors
Using the Web as the platform
for modeling editors
deployment while reusing
modeling frameworks for
language servers
Managing different
languages developed with
different modeling platforms
from a single editor
Providing a single user
experience of modeling
editors so users can easily
deal with different languages
14. Vision: communication protocol
Using LSP
Standard
Reuse LSP tools
Future features
For textual langs.
No hybrid
representations
Extending LSP
Standard
Reuse LSP tools
Future features
Hybrid
representations
Concrete syntax
support at client
Textual rep. req.
New protocol
Element ids
Optimized for gme
operations
Standard (?)
LSP overlapping
LSP compatibility
-
+ +
-
+
-
15. Vision: communication protocol
Although the pros of defining a new protocol or
extending LSP may be substantial, we argue that
using LSP itself plus a textual representation is
expressive enough for graphical languages, and
most of its drawbacks may be properly addressed by
providing the needed LSP infrastructure.
LSP provides
enough
expressiveness
for graphical
manipulations
17. Intermediate Representation Format
A JSON-based format:
● abstract,
● concrete
● and diagrammatic properties
Design driven for two main forces:
● encompassing abstract and concrete
syntaxes in a single resource
● provision of the necessary
information to the client
“Node-edge” representation
19. Mapping GME operations into LSP
Identification of operations
Reviewed three MDE
graphical editing tools:
● Papyrus,
● Sirius
● and GMF
Study of operations
Defined a comprehensive set
of use cases to illustrate how
we can map user operations
into LSP messages by
leveraging on IRF
1 2
20. Mapping GME operations into LSP
Identification of operations
Reviewed three MDE
graphical editing tools:
● Papyrus,
● Sirius
● and GMF
1
21. Mapping GME operations into LSP
Study of operations
Defined a comprehensive set
of use cases to illustrate how
we can map user operations
into LSP messages by
leveraging on IRF
2https://som-research.github.io/lsp4gml/cases.html
26. Proof of Concept
MDETools 2018
“An LSP infrastructure to build
EMF language servers for
Web-deployable model editors”
https://github.com/SOM-Research/lsp4gml
27. Conclusions and Future Work
We discussed different alternatives of clients, servers and the LSP usages for
decoupling graphical language editors.
We described an approach relying on standard LSP and a text-based model
representation shared between clients and servers.
Roadmap:
● Automatic generation of graphical language servers
○ To what extent is feasible?
● Performance assessment
○ bandwidth optimization and server-side enhancements.
28. Decoupling GME dev into a client-server architecture
using a convenient protocol is a key approach.
Let’s use an open common protocol to share
our graphical language servers
Final
Remark
30. Towards a Language Server Protocol
Infrastructure for Graphical Modeling
Roberto Rodriguez-Echeverria, Javier L. Cánovas, Manuel Wimmer and Jordi Cabot