How to add the local extension to my local theia web ide

Nice to meet all theia masters . :grinning:
I create the example extension by the guide * Authoring Extensions successfully.
And next, i need to build it and then add it to my local theia web ide to check the extension result and share it to my partners, like buiding to a XXX.vsix file or some other type file to share.
Is there any guide links or suggestions for this?
thx and looking forward a reply on line.

Hey @passion123,

Theia extensions aren’t vscode extensions and therefore aren’t bundled like them. See this doc on the difference between them.

Instead, you add Theia extensions simply to the package json of your browser/electron application. The best way to accomplish this is usually to host both the application and all of your extensions in a single monorepo. Arduino does this as well.

thx for attention . I need to add my local extension to my theia ide and my partners’ theia ide,or in the other word, we need to develop some extensions based on the theia web ide, how to work together and how could we achieve it ?

Are you talking about adding Theia extensions during runtime? Theia extensions are a compile-time feature which are baked-in into the specific Theia application. Only Theia plugins/vscode extensions can be added to Theia during runtime without compiling them into the application.

In general I would recommend you to look at the theia yeoman generator and the resulting project structure. It’s a reusable project structure for authoring apps+extensions in one repo.

Oh,thx for ur patience. And i want to confirm again that, if i want to extend the function or add some customer buttons to my theia web-ide,i should create the vs code extenstion instead of the theia extension ?

VSCode extensions are somewhat limited in what they can accomplish. Since they only have access to a very limited API, they are usually reserved for adding new languages to your IDE and similar stuff.

Meanwhile, if you’re looking to actually modify Theia’s behavior, this is only possible using Theia extensions, which provide you the whole Theia API surface. However, their compile-time setup is a bit more involved than simply installing a vsix file from the marketplace. Note that most Theia application usually mix vscode extensions (for language features, color themes, etc.) and Theia extensions for the best results.

With custom buttons, do you mean menu entries? This isn’t possible to accomplish using the vscode extension API, so you would have to write a Theia extension for that.

:smiling_face_with_tear: yes,take a simple req for example,i need a button to upload my code file or the .jar file packaged by maven to my server’s path to scan which edited by the theia ide.
can the theia extension achieve this request ? If ok, could u show me some advice or guides to how to build my local custom thiea extension and add it to my local theia web ide Launched from a package.json .Thx a lot

Like I said, I would recommend to start off with the theia yeoman generator hello-world project. It contains all you need to get started with a combined Theia App + Theia extension.

You can also take a look at the Arduino-IDE built on Theia, which also uses a very similar setup (although they only use Electron).

Sorry for late response。i was forbidden reply times for a newer . i have add the ‘“hello-world”: “0.0.0”’, to my local theia ide package.json and copy the whole "hello-word " folder to the theia node_modules. after yarn start the theia app,but the ‘say hello’ button still does not appear ? is there some thing wrong?

@passion123 Did you recompile everything? You changes won’t be included in your build otherwise. There is a theia build cli command for this.

Thx ,it works.After running the command theia build and then run the start ,it shows.Thx very much :100: