What is Eclipse Theia?

June 20, 2018 | 9 min Read

In 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 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). Tools built on Theia can run as desktop applications or in the browser. Besides that, the scope is pretty much like the classic Eclipse Platform and the Eclipse Tools platform. Such a tool 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:

  1. 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.

  2. 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.

  3. 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 “use Theia” directly, but you rather use products that are built on Theia. However, if you want to try “vanilla” Theia, there are several ways to do so including Theia Blueprint, a template tool 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 compared to VS Code thus fills a blank spot in the tool ecosystem with its unique features for being an open platform, rather than an extensible code editor.

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 VS Code.

What is the current state?

Theia has reached a very good state in terms of feature coverage, even compared to the Eclipse desktop, although the project was incepted only in 2017. This is possible as 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, the Java tooling of Eclipse Theia is actually based on Eclipse JDT. Therefore, Theia is already very powerful for its age as a platform.

Theia has already 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. Additional projects such as the Graphical Language Server Platform (GLSP) (for diagram editing), EMF.cloud (for building modeling tools) or Langium (for creating textual DSLs) 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 uses 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. Another technique is to avoid manually written SWT code and use declarative approaches such as EMF Forms and JSON Forms.

However, the more interesting question is whether you would like to migrate to Theia. First of all, you should evaluate whether or not you would benefit from a web-based solution, see also our discussion of web-based vs. desktop-based tools. Second, there is no rush if you have an existing tool. If you look at how long tools took to migrate to Eclipse 4, it is clear that not everything is re-implemented overnight. This is especially true for tools that typically have a long life cycle. Many projects could benefit from a more modern UI stack and from running remotely in a browser, though. If you plan to migrate an Eclipse-based product or plugin to Theia, please read our migration guide and Jonas’ talk on migrating to Theia.

However, it is essential to develop a strategy for the future already now, as also pointed out in the migration guide.

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 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!

Jonas, Maximilian & Philip

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. …