I have a requirement to custom the lunching process of the theia.
Description: i have a buttom with different params clicked to lunch the theia, and the theia will be lunched with opening different params form the buttom.
e.g :If the param is a, lunch the theia and then open the a project ,if it is B,open the B project, if it is C,but the C project is not existed, open a default template project .
i have checked some of the workspace extension source code, but still have no idea on how to achieve the requirement. Could u give me some advice or idea on it?
Thx a lot.
it depends a bit on whether you want to run the browser or electron version of Theia. For the browser version you just need to append the workspace path to the web app URL. For electron, this code indicates that you just need to pass the workspace path to the executable of your electron app as an argument.
Thx,I just need to run the browser so far fortunately.
As you said, I append the workspace path to the app url and it can open it. But if i don’t point a workspace path to the theia app URL , for example opening the root path " http://localhost:3000" without any workspace path,it will open the last, And If there is a way to avoid the theia to open the last path？so that, the user can create a new project directly, that would be better .
I see, you can just append
#!empty to the URL to open an empty workspace like
Whoop! .It worked. Thx very much