I want to learn the source code of theia,Can You give me some suggestions?

Now I try to study the source code,But the code is too more to learn,And I don’t know features of module,What I should do?Thx

[original thread by oyo]

@oyosc You can ask for pointers here. You can find on UI something similar to what you to implement and then find relevant code and study. There is no sense to study everything at once.

@oyosc you’d might like to browse the repo at the following pull-request (https://github.com/eclipse-theia/theia/tree/783168f749dc479f020fd3d28922e26ddbb2f1b7), the readme for individual packages have been updated to include a high-level description from which you can start with. You may also like to look at the generated API doc to focus on an area like Anton mentioned: https://eclipse-theia.github.io/theia/docs/next/index.html


@anton-kosyakov @vince-fugnitto thx,If I want to change the layout of theia,waht I should do? or how to learn

Do you have a more concrete example? What would you like to change regarding the layout?

I think I’ve answered it another thread already. There is FrontendApplicationContribution interface which allow extension to hook into frontend application lifecycle: https://github.com/eclipse-theia/theia/blob/842e717475697676c0f298e605b3674bea451ec9/packages/core/src/browser/frontend-application.ts#L31-L76

It actually has js-docs and interesting method for you is initializeLayout: https://github.com/eclipse-theia/theia/blob/842e717475697676c0f298e605b3674bea451ec9/packages/core/src/browser/frontend-application.ts#L66-L70

So if you open this file in your IDE, you should be able to use tools like reference search to see who and how implements it.

@oyosc, if you want to custom layout, you have to subclass the ApplicationShell and override the layout method. Here: https://github.com/eclipse-theia/theia/blob/a7ec8088e475c0ce811e96fdc846172568cbfd84/packages/core/src/browser/shell/application-shell.ts#L534-L556