Header image

It's full of stars

Where documentation meets reality


Using SAP Fiori VS Code plugins in Eclipse Theia

By Tobias Hofmann January 17, 2022 Posted in SAP

Reading time: 4 min read


Visual Studio Code ๐Ÿ”— from Microsoft is currently one of the most used IDEs by developers. It is fast, available for all platforms and can be used for almost all programming languages (hello ADT). It can be extended easily via plugins. Microsoft offers a central place to install plugins from: a marketplace that is even built into VS Code ๐Ÿ”—. This allows developers to adapt VS Code to their needs stress-free via plugins. This is one of the not-so-secret reasons why Code is so popular (another reason is the well working dark mode).

VS Code Marketplace

Great for every non-ABAP SAP developer is that SAP is providing several plugins. Searching for SAP reveals several plugins ๐Ÿ”—. Not all are from SAP. Yet the list of official SAP plugins is still impressive. There are plugins for CDS, Fiori, UI5, Mobile Services, HANA, etc. More and more plugins are made available by SAP, with Fiori leading by far. Not a surprise, you must be where the developers are. And SAPโ€™s own BAS is using VS Code Plugins.

Eclipse Theia

SAP BAS is based on Eclipse Theia ๐Ÿ”—. And while VS Code and Eclipse Theia ๐Ÿ”— (short: Theia) look very much the same, the similarity is caused mostly because both use the same editor engine Monaco ๐Ÿ”—. There are differences between ๐Ÿ”— VS Code and Theia. Besides trying to be more open, the idea behind Theia is that you build your own Theia application. To explore Theia it is not necessary to compile and build from scratch. There is a ready-to-run Theia installation available โ€“ Theia Blueprint ๐Ÿ”—. This application serves as a showcase. It perfectly matches the use case to explore the features of Theia. There is a certain level of compatibility when it comes to including VS Code plugins in Theia, making it possible to enhance your Theia application with VS Code plugins. This is also what SAP does in their BAS offering.

Fiori development in Eclipse Theia

This is all great, except: it wonโ€™t help when developing Fiori apps. Theia comes without any SAP plugin. But: there is the VS Code plugin marketplace! Just: you cannot ๐Ÿ”— use it. The TOU ๐Ÿ”— for the VS Code plugin marketplace states: โ€œThe Marketplace enables you to access or purchase products or services which are designed to work with and extend the capabilities of Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, GitHub Codespaces, Azure DevOps, Azure DevOps Server, and successor products and services (the โ€œIn-Scope Products and Servicesโ€) offered by us and GitHub, Inc. (โ€œGitHubโ€).โ€

The problem here is now that these plugins are made available: in the VS Code marketplace.

You cannot point Theia to the VS Code plugins marketplace, as the license of the marketplace enforces the usage of VS Code. Eclipse Theia cannot connect to the marketplace and load the plugins from there. Does this now mean that Theia makes it overly complex to add plugins? No, of course not! Theia also can connect to a marketplace to search and install plugins: Open VSX Registry ๐Ÿ”—. Plugins listed there can be installed and used. Via this registry, Theia offers the same flexibility and UX as Microsoft does for VC Code via their marketplace.

Unfortunately, SAP is not publishing their plugins in the Open VSX Registry. Technically, it is possible to install VSXI plugins from the VS Code marketplace ๐Ÿ”—. SAP is not making (most of) the VSXI file available outside the marketplace. Making the usage of these in Theia complicated, as you can only find them in the VS Code marketplace and not on e.g. GitHub. For the usage in Theia, this means: not possible to use SAP VS Code plugins. It is possible to download the VSXI file from the VS Code marketplace and install them manually in Theia. I guess this is also against the TOU, therefore not recommended.

What now?

I do not know why SAP is not publishing their VS Code plugins for Fiori, CDS or Mobile to the Open VSX Registry. SAP is proud ๐Ÿ”— of their Open Source contributions and initiatives ๐Ÿ”—. SAP is involved in the Eclipse Theia project. SAP Business Application Studio is based on Theia. The plugins are compatible. Yet, SAP is not publishing them in a way that allows to use them in Theia. For instance, why is SAP not pushing them once to VS Code marketplace and to Open VSX Registry? Or making the plugins available on GitHub or GitLab so users can get them from there and install them in either VS Code or Theia? Maybe with the latest news ๐Ÿ”— at least the last point might change. Albeit I do not know the priority the plugins do have.

If you wonder, why this is a problem and you should care about this: the answer is Che. More about this in another blog post.