Spectrum is now read-only. Learn more about the decision in our official announcement.


Eclipse Theia - Cloud & Desktop IDE


Trouble authoring a custom plugin!

January 15, 2020 at 6:18pm

Trouble authoring a custom plugin!

January 15, 2020 at 6:18pm
First of all, I would like to congratulate and thank Theia's team for the incredible work they have done so far. I just discovered Theia, but personally, i think that the project is magnificent and opens the door to many possibilities in terms of IDE'S.
Now, having that in mind, i wanted to create a custom plugin for testing, and possibly contribute.
In first place, i succesfully built my own IDE as it was shown in, after seeing the IDE running in my browser i knew i could keep going.
Then, i decided to follow the tutorial in and, after getting to the execution of the yeoman generator plugin i found the first misshap (or at least, i think it is)
I didn't thought too much about it and kept going, and so, i went to the IDE folder, updated the package.json file adding /plugin ("next"), /plugin-packager ("latest") and /plugin-ext ("next") and then i updated the workspace using yarn, so far so good.
After that i restarted Theia and tried to look for the "hosted mode" command, but i couldn't find it anywhere.
And so, i thought that maybe it was a problem of the custom plugin, so i tried to build it again, and then this happened.
So, there it is, i'm stuck. I can't start a Hosted Mode instance, and i can't rebuild my plugin for updating it (for clarification, the only changes made to the plugin code after the yeoman instalation is just a change in the label and the information message strings, nothing else).
Where did i go wrong? How can i fix this?. My objective is to create a plugin for a real-time preview of an express.js server, should it be a plugin? can i get this real-time preview using another method?
Thank you very much for your attention and help.

January 15, 2020 at 6:21pm
By the way, this is my current package.json for Theia's build.

January 16, 2020 at 1:45am
You know that you can develop VS Code extension and run it in Theia and VS Code?
Whether you want Theia extension or plugin depends more whether you want to build own product or just contribute a bit of functionality to some existing IDEs. VS Code extensions (plugins) allow to contribute some views like trees and webviews. But they are very limited and design to treat such views as remote content. If you design your product (meaning you are in control of user experience including performance) then you are better to use Theia extensions contribute a widget directly, have access to DOM, good integration with editors and so on. If you are not go with VS Code extensions.
But it is only concerning UX and UI tech, for languages, debuggers and so on I would try always go with VS Code extensions first to run them more isolated and allow to plug more at runtime.
For debugging plugins you can use launch configurations, like here

January 16, 2020 at 9:00pm
Thank you very much for your response and guidance! To be clear, i just want to automatically deploy a service and create a preview of that service after theia starts, just like it's shown on theia's workspace example hosted in gitpod. I just have not been lucky getting some example to do so.
Deploying a custom service (like an express server, or a simple js program) it is something already coded on theia? Maybe i'm way overcomplicating things, and it has already done. By the way i'll check your link and report back as soon as i can.
Hi, what do you mean by realtime preview of express.js? Do you mean it serves some website and you want to show in Theia widget? There is already the mini-browser extensions, you can use it to open some page. As a user look for Preview: Open URL command and then just type it. Programmatically, you will need a theia extension (not plugin), which calls

January 22, 2020 at 3:41pm
thank you, i tried what you suggested, and it worked fine. Now i have another issue, but i will make another post.