Jonas Helming, Maximilian Koegel and Philip Langer co-lead EclipseSource. They work as consultants and software engineers for building web-based and desktop-based tools. …
What is Eclipse Theia?
June 20, 2018 | 9 min ReadIn this article, we provide an overview about Eclipse Theia, an open source platform for building web- and cloud-based IDEs and domain-specific tools. We describe the basic features of Theia and compare it with relevant technologies including the classic Eclipse platform. So if you are new to Eclipse Theia and want to learn what this is all about, keep on reading!
According to the hypothesis, **“Theia”** collided with earth 4.5 billion years ago
What is Eclipse Theia?
Theia is a platform for building custom IDEs and tools. Theia is based on modern web technologies (TypeScript, HTML and CSS), integrates state-of-art standards such as the Language Server Protocol (LSP) and the Debug Adapter Protocol (DAP). Furthermore, Theia is compatible with VS Code Extensions, so you can benefit from a huge ecosystem of available features to extend your tool. Tools built on Theia can run as desktop applications or in the browser. Besides that, Theia as a platform aims at two generic goals:
The first goal is to provide common features, which can be reused to implement a custom tool as efficiently as possible. Some good examples for this feature are a file explorer, support for Git or a source code editor with syntax highlighting. These reusable features significantly lower the required effort for the implementation of a custom tool or IDE.
The second goal is providing mechanisms to integrate existing and new modules to a custom product, e.g. “an IDE for TypeScript developers” or “a tool for embedded system engineers”. This integration must be supported on both a technical level as well as from a UI perspective. This allows you to create a custom product by combining existing modules with custom extensions.
Eclipse Theia in particular adds a third goal: A platform for building tools as desktop-apps and web-apps sharing the same code.
To achieve the first two goals, Theia provides three main features:
A basic workbench frame including menus, a status bar, a view concept, part layouting, a workspace abstraction, etc. This basic workbench can be extended with custom UI extensions, such as menu items, custom views, and custom editors.
A modular extension mechanism, allowing you to implement features in a modular, reusable and combinable way. Those extensions can target the frontend, the backend, or both. This extension mechanism also allows the user to install new features.
Common tool features to be reused, e.g. an integrated source code editor supporting LSP, debugging, support for source control with Git, a terminal and many more.
To target the third goal – the ability to run a tool on the desktop and as a web application – Theia consists of two parts, a client (the UI) and a server. In a local, desktop scenario, the server part is deployed locally. Theia is implemented in Typescript, CSS, and HTML. When running a Theia-based tool on the desktop, Electron is used as a local replacement for the Browser.
The same tool based on Theia, running as a desktop application and in the browser.
As Eclipse Theia is a platform not a tool by itself, you cannot really “install Theia” directly, but you rather use products that are built on Theia (see the Theia Website for some examples). However, if you want to try “vanilla” Theia, there are several ways to do so including the Theia IDE, a modern development environment directly provided by the Theia project.
Yet another Web IDE?
There are several similar approaches out there already, some commercial and some open source. So why is there yet another Web IDE? The combination of several interesting features make Eclipse Theia unique in the market. To pick the most relevant ones from our point of view:
Web AND desktop-based: Theia as a platform supports the use case to run tools in the cloud (access via a browser), but also, with the same code, on the desktop (via Electron). This is a very unique and interesting feature, as it provides a lot of flexibility when it comes to use cases for tools created based on Theia.
Do not reinvent the wheel: Theia reuses other frameworks, standards and technologies wherever it makes sense to do so. Otherwise, the project would not have evolved so quickly. As an example, Theia reuses the Monaco code editor of VS Code and makes strong use of the language server protocol (LSP). In fact, you can even use VS Code extensions in Theia.
For IDEs, domain-specific tools and even rich clients (not only code editors): Theia does not aim at being a simple code editor, but rather being a platform to create comprehensive tool suites, integrated development environments (IDEs) or similar applications that follow a workbench schema, similar to applications that would have been built on Eclipse RCP in the past.
Extension first: Theia is designed to be a platform from ground up. This leads to a consistent “extension first” approach, which basically means: Everything is an extension, even the core features, which are provided by the project itself. As a result, you can customize almost everything within Theia and even replace core features, if you like. This is an important “lesson learned” from the Eclipse rich-client platform. Therefore, Theia provides two distinct extension capabilities and it is rather straightforward to create Theia extensions.
Active community and vendor-neutrality: The project has a lot of traction and many of the key players in the Eclipse ecosystem are actively adopting and contributing to Theia (see the next section). Eclipse itself could never have been as successful as it is without its excellent ecosystem. Therefore, building a strong ecosystem around a technology, such as Theia, is the key to success. Consequently, Theia is hosted at the Eclipse Foundation and is therefore a vendor-neutral project with reliable governance.
In summary, Eclipse Theia is a great choice for building custom IDEs, domain-specific tools and other applications that require a workbench-like concept. Theia thus fills a blank spot in the tool ecosystem with its unique features for being an open platform, rather than an extensible code editor. Please see also our comparison between Eclipse Theia and VS Code OSS and the comparison between the Theia IDE and VS Code
Who is behind the project?
One very interesting aspect about Theia is that from the beginning it has not been a single-vendor driven project. Even the initial idea and scope has already been discussed with many member companies at Eclipse. If you look at the list of >400 contributors, and the contributing and adopting companies (see below), you will immediately see that Theia is not a one-man show nor is it controlled by one player.
The broad variety of collaboration parties also clearly differentiates Theia from other web-based IDEs and platforms (see for instance in the comparison of Eclipse Theia to the VS Code Project).
What is the current state?
Theia has reached a very good state in terms of feature coverage and robustness, even compared to the Eclipse desktop, the project was incepted in 2017. Theia reuses existing components wherever this makes sense, rather than reinventing them from scratch. A good example for that is the reuse of the Monaco Code editor, which has its origin in VS Code and is also embedded into Theia. Another example is the focus on the language server protocol (LSP), which allows you to reuse existing language servers. Finally, many existing tool frameworks and components can actually be reused in Theia due to its flexible architecture. As an example, you can use plain React to implement custom UIs in Theia.
Theia has been successfully used as a basis for many products and we have successfully adopted Theia for several customer projects. Furthermore, Theia is very stable when adopting it for a custom project. However, Theia also very activly drives innovation, e.g. with Theia AI for building AI-augmented tools or with the integration of the Open Collaboration Tools Project for enabling live collaboration between users. Additional projects such as the Graphical Language Server Platform (GLSP) (for diagram editing), EMF Cloud (for building modeling tools), Langium (for creating textual DSLs) or Theia Cloud (for hosting Theia applications in the cloud) are augmenting Theia to add missing bits and pieces. Therefore, Eclipse Theia is a solid and comprehensive basis for the implementation of web-based tools. The following screenshot shows a diagram editor in Eclipse Theia, based on GLSP. If you want to see an example tool built on Theia online, please have a look at the EMF.cloud coffee editor.
How is it different from classic Eclipse?
In a nutshell, Eclipse Theia is the next generation Eclipse Platform for IDEs and tools.
The most obvious difference is the technology stack. While Eclipse is implemented based on Java, SWT and uses OSGi as a module system, Theia is implemented in TypeScript using HTML and CSS for the UI and provides its own extension mechanism based on npm. Therefore, if your UI is implemented in SWT, you cannot simply migrate it to Theia. However, there are several strategies to reuse existing tool components in Theia. One example is to embed existing components, e.g. a compiler into the server part of Theia and embed their results into the UI. The most prominent example is using a Language Server (LSP), which operates exactly like this. In an nutshell, Theia is a very interesting migration option for many existing tools and IDEs, which are still based on desktop technology stacks.
If you plan to migrate an Eclipse-based product or plugin to Theia, please get in contact with us. EclipseSource has a strong focus on modern, web-based tools combined with a deep understanding of traditional technologies you might still apply today. We provide you with support, consulting and implementation services for your migration project.
Conclusion
Theia is a very interesting platform for building tools, IDEs and RCP-like applications. This also makes Theia a preferred migration target for the modernization of tools that are currently based on Eclipse desktop. It fills an important gap in the Eclipse ecosystem allowing you to build web-based tools, which can still run on the desktop. Theia is indeed the next generation of Eclipse and continues to move forward very quickly. With the broad and diverse group of contributing parties, it is very promising to continue being a powerful piece of technology.
Therefore, we are continuously contributing to Theia and actively use it in customer projects. Furthermore we are continuously working on enhancing the support for AI-assistance, for graphical editors with GLSP and support for modeling, including form-based data-centric tools in Theia (see EMF Cloud). Eclipse Theia is a stable and mature platform and a perfect basis to enter the world of web- and cloud-based tooling!
If you are interested in using Eclipse Theia to create your own tool or to migrate an existing tool to the cloud, have a look at our service offering for support around Eclipse Theia, web-based tools or tools in general and please do not hesitate to get in contact with us!