In this paper, we propose a general architecture for designing language servers for hybrid modeling languages, that is, modeling languages that contain both textual and graphical representations. The architecture consists of a textual language server, a graphical language server, and a client that communicates with the two servers. The servers are implemented using the Language Server Protocol (LSP) and the Graphical Language Server Protocol (GLSP) and are based on a shared abstract syntax of the hybrid language. This means that only static resources need to be common between the graphical and textual language servers. The servers' separation allows each to be developed and maintained independently, while also enabling forward-compatibility with their respective dependencies. We describe a prototype implementation of our architecture in the form of a hybrid editor for the UML-RT language. The evaluation of the architecture via this prototype gives us useful insight into further generalization of the architecture and the way it is used. We then sketch a suitable extension of the architecture to enable support for multiple diagram types and, thus, multiple graphical views.
翻译:在本文中,我们提出设计混合型模版语言语言服务器的一般结构,即建模语言,包含文本和图形表达式。该结构由文本语言服务器、图形语言服务器和与两个服务器沟通的客户组成。服务器使用语言服务器协议和图形语言服务器协议(GLSP)实施,并以混合语言共同的抽象语法为基础。这意味着只有静态资源才需要为图形和文本语言服务器共同使用。服务器的分离使得每个服务器能够独立开发和维护,同时能够与各自的依赖性相容。我们以UML-RT 语言混合编辑的形式描述了我们结构的原型实施情况。通过这一原型对架构的评估使我们对结构的进一步概括及其使用方式有了有用的洞察力。我们随后绘制了架构的适当扩展图,以便能够支持多个图表类型,从而支持多个图形视图。