Technical Articles
How to Install a VS Code Extension to SAP Business Application Studio
SAP Business Application Studio supports Theia plugins and some VSCode extensions. I have mentioned how to install a Theia plugin here. Basically, there are three options to install a plugin provided by Theia plugin-ext module. In this post, I will document the easiest way to install a VSCode extension.
Prerequisite: You should have the authorization
You should add “Business_Application_Studio_Extension_Deployer” role collection to your account:
Step 1: Obtain the .vsix file
You can download this file from a project’s GitHub releases or from a marketplace.
As Abdel Elghanam mentioned in the comments below best way to download it seems to be https://open-vsx.org/ at the moment.
Step 2: Upload the .vsix file to SAP BAS
Drag the .vsix file from your computer to a directory in SAP Business Application Studio:
The extension is uploading:
Ensure that it is uploaded:
Step 3: Learn the absolute path of the .vsix file
Open up a terminal:
You can run these commands in succession to be sure:
ls
pwd
Note the directory of the file. Prepare and copy the directory to the clipboard in this format:
local-dir:/home/user/projects/
Step 4: Start the deployment
View -> Find Command (or just press F1 or Ctrl+Shift+P)
Search for “deploy” and hit enter:
Paste the directory you have copied and hit enter:
The extension should be installed now!
You can also check the JS console of the browser:
Alternatively you can check the plugins pane (View > Plugins) as Asaf Bruner mentioned in the comments.
What is the easiest way to remove a plugin? Unfortunately, there is no UI option for that yet. You can remove some plugin folders. But since plugins are installed per Dev Space. The easiest way is to create a new Dev Space and move your project.
Thanks for great post. I was wondering about deployer & now its clear?
Thank you for the feedback Nabheet!
Basically, there are three options for the deploy command:
Theia can't fetch the extension from other marketplaces due to potential licensing issues.
Another thing to note is that Theia caches plugin installation files under /tmp. If you want to update a plugin you can encounter problems. I would recommend creating a new Dev Space. That is all I know for now. 🙂
Regards,
Fatih
Nice post, thanks.
Also, if you want to make sure that the plugin is installed, you can look for it in the plugins pane (View -> Plugins)
Great post, thanks!
I downloaded one plugin from vscode marketplace and tried to install it, but some vscode version issue happened:
"Activating extension Code Spell Checker failed: The language client requires VS Code version ^1.42.0 but received version 1.41.1."
Do you have any suggestion to upgrade the vscode version?
Hello Robin,
I think SAP manages and updates the Theia version for BAS. Its plugin API may be a few versions behind. I assume there will be similar issues in the future: https://github.com/eclipse-theia/theia/issues/7243
I think easiest way is to get an old version of the same extension until BAS is updated. There is a way to get them for VSCode
Regards,
Fatih
Hello Fatih Pense ,
GREAT article, i was just about to dive in on how you can do that in Business Application studio, when i came across your PERFECT explanation here.
Quick one: Is there some sort of REPO that you know of that we can search for THEIA supported plugins ?
Cheers Mate,
Hey Fatih Pense ,
Just updating you on what i did, i just opened the gitpod version of THEIA, and browsed through the plugins there ? … and downloaded the XML Tools plugin , so i can format the SAPUI5 XML fies.
https://open-vsx.org/
It is working, it’s ALIVe :D.
Cheers Mate,
Hello Abdel,
Glad you found the post useful. And thank you for your contribution! open-vsx looks very useful.
Best,
Fatih
Hello Fatih,
Thanks for the article. Could you please elaborate on point number 1- obtaining the .vsix file?
I am still unsure where to search for it.
I am new to Business Application Studio, sorry if this is something obvious.
Regards
Jagoda
Hello Jagoda, I think the best way is to use https://open-vsx.org/ as Abdel mentioned above. I will also include this link in the blog post.
Regards,
Fatih
Hello Fatih,
Ok, I understand now. Thank you so much! I managed to install my plugin 🙂
Regards
Jagoda
Hi I can able see the installed extension but its not showing on left pane