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

How to start hosted instance in Authoring Theia Plug-ins? #313

Closed
ggodlewski opened this issue Aug 12, 2022 · 4 comments
Closed

How to start hosted instance in Authoring Theia Plug-ins? #313

ggodlewski opened this issue Aug 12, 2022 · 4 comments

Comments

@ggodlewski
Copy link

I'm trying to create hello world plugin from tutorial https://theia-ide.org/docs/authoring_plugins/

Currently I'm on the step "Executing the Plug-in"

  1. I Hit F1, Hosted Plugin: start instance
  2. Select directory
  3. In the output there is an error:
yarn run v1.22.19

error Couldn't find a package.json file in "/home/gg/bin"

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

image

/home/gg/bin is a directory from which I'm starting current TheiaBlueprint.AppImage

Why is it looking for some package.json in this directory?

Also screenshots look like they are from some old version of Theia.

@JonasHelming
Copy link
Contributor

Thank you for reporting this. I can reproduce the issue, we will discuss a fix.
In the meantime: Is there a particular reason why you want to create a Theia plugin and not either a VS Code extension or a Theia extension (see here).
Most adopters use VS Code extensions or Theia extensions. We should probably make this more clear in the documentation. Thank you again for the report!

@vince-fugnitto @paul-marechal @tsmaeder

@JonasHelming
Copy link
Contributor

Please see here for the follow up discussion about updating the documentation.

@ggodlewski
Copy link
Author

Thank you. The reason I started with plugin was this website. The pros clearly show that using plugins is better than extensions.
I wanted to use Theia instead of Electron to create my project because I seemed that it would be faster. This is the 3rd issue I reported regarding the website. It seems very outdated or maybe I maybe it's just my learning path?

@planger
Copy link
Contributor

planger commented Aug 19, 2022

Hi @ggodlewski, thank you very much for your feedback! It is highly appreciated. 👍

The Theia plugin mechanism you were attempting to use is something quite special and the documentation on this mechanism is indeed a bit dusty, I guess because it isn't used a lot. The two main extension mechanisms of Theia, which are much more commonly used, are:

  1. Theia extensions
  2. VS Code extensions

Whether to use (1) or (2) really depends a lot on the use case. One is not clearly better than the other. While the Theia extensions mechanism (1) is much more powerful and makes it much easier to write native custom views and editors, the VS Code extension mechanism (2) is a bit simpler to use -- except for custom views and editors -- and enables using your extension in Theia and VS Code, however it is very limited in what you can do. For an in-depth discussion of this topic, please confer to a dedicated blog post on this topic.

Thanks again for taking the time to report issues for improving the documentation! Not many new adopters are doing that, but it is a very valuable contribution and eventually helps improving the onboarding experience of many new adopters to come significantly!

Based on your feedback, we've opened two tickets (#314 and #316), which we are addressing soon. 🧑‍🏭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants