Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Plug-in System #2007

Merged
merged 40 commits into from
Jun 20, 2018
Merged

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented May 31, 2018

This PR brings a new way to extend Theia by using plugins (in addition to extension)

The plugin model is having (compared to Extension) :

  • code runtime isolation (separated node instance or in a web worker)
  • self-contained (no need to download external dependencies)
  • no dependency requirement (like inversify) except the dependency to the API type. @theia/plugin
  • no need to rebuild the IDE
  • simple API with a single entrypoint (theia object)
  • lifecycle with a start and stop method

More details on the original issue: #1482

Documentation on the API is provided

There are still missing API but it will come as enhancements to the current model.

Here is a quick video on youtube (click on the image)
Plugin in a running Che

Please feel to add any reviewer to review the PR.

@benoitf benoitf added the plug-in system issues related to the plug-in system label May 31, 2018
@benoitf benoitf requested review from svenefftinge and akosyakov May 31, 2018 14:53
@akosyakov
Copy link
Member

Impressive work!

What are reasons/benefits of:

@benoitf
Copy link
Contributor Author

benoitf commented Jun 18, 2018

@akosyakov
1.
on the travis file, it was to publish it on a different scope to try it. But this commit is flagged as TO BE DELETED before the merge. So of course, we won't merge any travis change at all (or appveyor or any other)

  1. On code organization rule, it was to enforce a clear separation on what will be used in "forked" instance to the remaining one (by default on the linked document, the code is either on browser or or node but never in a forked instance

On custom RCP-Protocol, you mean by using vscode-jsonrpc one ? (I tried to search because I was almost sure we already discussed that point but I didn't find the content online) But if I remember well we said we could postpone that RPC rewrite a bit later.

@akosyakov
Copy link
Member

@benoitf ok, could you adjust commits and i will have a look once more?

@benoitf
Copy link
Contributor Author

benoitf commented Jun 18, 2018

@akosyakov you think we can reach merging state soon ? (if I adjust commits to get rid of .Travis CI changes)

@akosyakov
Copy link
Member

akosyakov commented Jun 18, 2018

@benoitf if it does not break any existing code i am fine to merge it that you can continue on master. The package structure, rewriting RPC and any other issues can be improved with follow-up PRs.

/**
* The style in which the editor's cursor should be rendered.
*/
export enum TextEditorCursorStyle {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's copied from vscode. If so, please attribute with MIT license in the header.

@benoitf
Copy link
Contributor Author

benoitf commented Jun 18, 2018

@akosyakov ok rebased and removing travis ci commits

@akosyakov
Copy link
Member

@benoitf it seems that not all commits are signed off

evidolob and others added 14 commits June 19, 2018 11:13
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Also move to dev dependencies the core package so plugin's won't have transitive dependencies to core

Change-Id: I2b08265ba411fdf561d52b822dde3c517622a3f3
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
…e, Linking is performed dynamically by providing '@theia/plugin' object on the fly

Only the module declaration should be exported in package.json
-> So we provide a node cache entry of '@theia/plugin' on the fly

Change-Id: I3af8883122c2d0ecfad94c69c1eaf15cb94a0071
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Change-Id: I5288617ebdf93469d33fe0e1508919ea137657d5
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
this PR implements
- retrieving metadata from plugins and using the metadata for plugin activation and deactivation;
- pluggability, which allows extending the plugin system to run different types of plugins.

Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
…xtension

Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
* Split hosted and main part in two folders
also make CI green again
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
benoitf and others added 24 commits June 19, 2018 11:16
* Handle the deployment with deployers

ENV THEIA_PLUGINS can be set for example to
local-dir:/Users/benoitf/theia-plugins

to deploy all plugins from this directory at startup

Also add widget view and some vscode handlers

Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
allow to override more stuff on init and load steps

Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
…on (#17)

Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
Change-Id: I956a52b82ed3374062942f9aebaa203614cc6a25
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
Change-Id: I22313a01998bb965152db0385f6adcd96e3998ae
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
* UI for development mode

* Code improvements

Signed-off-by: Vitaliy Gulyy <vguliy@codenvy.com>
…rowser (#26)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
Signed-off-by: Vitaliy Gulyy <vguliy@codenvy.com>
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
…APi (#29)

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
* implement Preference API

Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
eclipse-che/che#9435 add editor life cycle methods: open, save and close

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Oleksii Orel <oorel@redhat.com>
@benoitf
Copy link
Contributor Author

benoitf commented Jun 19, 2018

@akosyakov now DCO Sign-off is ok
appveyor build is failing due to the API rate limit

Downloading ripgrep failed: Error: API rate limit exceeded for 67.225.139.144. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@benoitf
Copy link
Contributor Author

benoitf commented Jun 19, 2018

@akosyakov now, is it ok for you as well ?

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@benoitf benoitf merged commit 6eb6065 into eclipse-theia:master Jun 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants