-
Notifications
You must be signed in to change notification settings - Fork 73
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
Conversation
07de9f6
to
83db05e
Compare
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. |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
I am having a look now |
doc/Authoring_Plugins.md
Outdated
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
doc/Authoring_Plugins.md
Outdated
npm install -g yo @theia/generator-theia-plugin | ||
mkdir theia-hello-world-plugin | ||
cd theia-hello-world-plugin | ||
yo @theia/plugin |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
"src" | ||
], | ||
"devDependencies": { | ||
"@theia/plugin": "latest", <-- 1. Theia API dependency |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added note on that
There was a problem hiding this 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>
No description provided.