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-ins page #10

Merged
merged 3 commits into from
Aug 31, 2018
Merged

Introduce plug-ins page #10

merged 3 commits into from
Aug 31, 2018

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Jul 16, 2018

No description provided.

@benoitf benoitf added the enhancement New feature or request label Jul 16, 2018
@benoitf benoitf force-pushed the plugins branch 2 times, most recently from 07de9f6 to 83db05e Compare July 16, 2018 12:48
Change-Id: I09e4ee6afa97d9e846f727e722fecf1cb81d0040
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>

### Plug-in vs Extension

Theia is an extensible IDE. You may already have heard extensions as being a way to customize the IDE. Plug-ins is a new extensibility model that has been added recently into Theia. Here are the main differences between plug-ins vs the extensions.
Copy link
Member

Choose a reason for hiding this comment

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

We should make sure that a reader understands when to use what and don't get an idea that plug-ins are replacements for extensions:

  • Theia is not just an IDE. In first place, it is an extensible framework to build IDE-like products with complete relayouting, rebranding and so on. The extension system is a key to it. IDE developers should use it.
  • Developers who wants to extend Theia-based IDEs should use plug-ins which by default are run isolated in a separate process and communicate with the core product via strictly defined APIs.


#### Plug-ins

pros:
Copy link
Member

Choose a reason for hiding this comment

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

This section should explain how each point is different in extensions if it supposes to show differences.

Not sure that it should be pros/cons, i.e. strict APIs is desirable for plug-in developers and DOM access is desirable for IDE developers.

I would prefer to focus on key differences, like code isolation and APIs. Things like compiltation time, backward compatibility in the long run should be fast and stable for IDE and plug-ings developers.

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.

I'm fine with merging as is and rework later if it causes confusion between extension/plugins.

@marcdumais-work
Copy link
Contributor

I am having a look now

Generator can be installed and executed with the following commands. Note that these commands can be entered from a new terminal inside your running Theia instance.

```bash
npm install -g yo @theia/generator-theia-plugin
Copy link
Contributor

Choose a reason for hiding this comment

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

This fails when I try - maybe it's not yet published? I see that there exists a "@wiptheia/generator-theia-plugin" - this is it for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix it, correct name is @theia/generator-plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

npm install -g yo @theia/generator-theia-plugin
mkdir theia-hello-world-plugin
cd theia-hello-world-plugin
yo @theia/plugin
Copy link
Contributor

@marcdumais-work marcdumais-work Aug 27, 2018

Choose a reason for hiding this comment

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

I could not get this command to work: "You don't seem to have a generator with the name “@wiptheia/plugin” installed."

update: running only 'yo', I could see the correct "target" name and run the generator for my current setup: "@wiptheia/theia Plugin". The result doesn't quite compile, but that's a step forward.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you did npm install -g yo @theia/generator-plugin ?

Copy link
Contributor

Choose a reason for hiding this comment

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

working now that I can install @theia/generator-plugin - thanks

Change-Id: I2a90df9fff3bfece6f5c1babafc82b9f4f57e793
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
"src"
],
"devDependencies": {
"@theia/plugin": "latest", <-- 1. Theia API dependency
Copy link
Contributor

Choose a reason for hiding this comment

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

I notice that on my generated package.json, it's picking up the next version of @theia/plugin, instead of latest. It's also picking up "@theia/plugin-packager": "latest". Not sure if it's an issue, but mixing next and latest dependencies can be problematic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will move to latest for both in generated code

"build": "tsc"
},
"engines": {
"theiaPlugin": "latest" <-- 2. this plug-in requires Theia runtime
Copy link
Contributor

Choose a reason for hiding this comment

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

I also have next here, in my generated file


```bash
npm install -g yo @theia/generator-plugin
mkdir theia-hello-world-plugin
Copy link
Contributor

@marcdumais-work marcdumais-work Aug 27, 2018

Choose a reason for hiding this comment

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

One little clarification might help remove some potential confusion: at this point I was not sure where I should create the new plugin folder. Under the theia repo or on its own? Maybe mention above that it can be on it's own, independent of the theia repo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point. I will clarify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added note on that

Copy link
Contributor

@marcdumais-work marcdumais-work left a comment

Choose a reason for hiding this comment

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

LTGM - good step in the right direction, documenting how to generate/run plugins, thanks!

Change-Id: I88b337bf0cfbdec2f1b75bbff5f711b60bf38280
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
@akosyakov akosyakov merged commit caf5d93 into eclipse-theia:master Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants