eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.08k stars 2.5k forks source link

[plug-in] Improve Theia plugin hosted mode launch #3345

Open evidolob opened 6 years ago

evidolob commented 6 years ago

Now we have debugger and we can use it to launch some external processes. I propose to provide special "type"(hostedMode) in launch.json file. And replace all 'Hosted*' commands with unified way of launching external processes. Example of configuration:

    "configurations": [
        {
            "name": "Launch Plugin",
            "type": "hostedMode",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": ["--hostedPlugin=${workspaceRoot}" ]
        }
    ]}

End user also receive more flexible and configurable way to launch hosted mode, and will also able to debug Theia backend.

Should also improve current hosted flow with this:

AndrienkoAleksandr commented 6 years ago

Nice idea.

mmorhun commented 6 years ago

I agree with the idea to have single point to start processes. However, I would like to have a configuration which could start hosted instance without debug mode.

mmorhun commented 6 years ago

Also additional parameters will make the process more comfortable, for example we may include hosted instance workspace folder and I have a proposal about user plugins which is not under development. We may have 2 paramaters for that:

"whitelist": false
"pluginlist": ["plugin-id-1", "plugin-id-2"]

The first flag should specify how to treat second parameter - the list of pluginis: if it set to whitelist this means that only plugins from the list will be added. If it blacklist it means that the plugiins will be excluded from hosted instance. The most common usage will be setting the flag and have empty list (i.e. everything or nothing), but if we need to exclude something, for example for development of the next version or so - it could be easily done).

benoitf commented 6 years ago

hello, what is the difference of commands with preferences vs tasks ?

evidolob commented 6 years ago

Tasks is and should be only way to launch external process from Theia in development flow. Also they allow to have more than one launch config. For example you may want to test your plugin with bare Theia and with Theia width some pre installed plugins, you just add two launch configuration and easy switch between them, instead changing configuration each time.

benoitf commented 6 years ago

@evidolob AFAIK you're describing a flow (like picking up which plug-ins to use, etc). A flow is not tied to its implementation. I just want to emphasis that all workshops/videos/docs are referring to command palette for now. So UX has to be handled first and documentation, etc

mmorhun commented 6 years ago

So, let's keep current UX, but rework implementation to be more flexible and use more common way for configuration.

mmorhun commented 6 years ago

I think issues about starting hosted instance on restart and opening a workspace in hosted instance will be fixed when approach in this issue is implemented.

mmorhun commented 6 years ago

Due to a lot of time which is needed to complete this issue and subtasks, it is postponed in favour of more urgent tasks.