Using SAP Fiori VS Code plugins in Eclipse Theia
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.
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.
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.