How to open a file from URL

Workspace can be opened by providing the path in URL. Is there a way to load a default window with some file opened?

[original thread by Soumya Tripathy]

@soumyat No, it is not supported and specific to end products, i.e. Gitpod analyze from which GitHub URL your come and figure out what should be opened. For your product needed behaviour can be implemented via: https://github.com/eclipse-theia/theia/blob/bda9ff9d4cf15b28b5ffc2e984f11834adfc8f33/packages/core/src/browser/frontend-application.ts#L66-L70

For instance it can have a look at URL fragment and call EditorManager.open to open a file.

Workspace can be opened by providing the path in URL.

I think it is actually a feature by accident. The original issue was to preserve an information about the currently opened workspace, by users started using it to actually open something :slight_smile:

[Soumya Tripathy]

Nice!! I was not aware of EditorManage.open. Doing some dirty workaround by overriding the localStorage so that restoreLayout will read it and open my file.