Che: [docs] How to add VSCode Extension to Eclipse Che?

Created on 11 Feb 2020  路  13Comments  路  Source: eclipse/che

Problem

I've seen in the documentation that I can add an extension of vscode to eclipse.
https://che.eclipse.org/eclipse-che-7-extending-developer-workspaces-to-run-vs-code-extensions-in-the-cloud-cbe97e11d4d4
But it only show the possibility and doesn't seem to tell me how to use it in eclipse che.

I'm using theia as the default frontend IDE of Eclipse Che
I know how to add the plugin provided by che, but I don't know how to add various plugins of vscode.
I know that there is a jenkins plugin in vscode.
I want to add Jenkins Extension to Eclipse Che
How to add VSCode Extension to Eclipse Che?

Relevant information

I have using eclipse che latest version

aredoc areplugins statucode-review

All 13 comments

I completed the following steps:

  1. Prepare a docker container with all necessary dependencies. It is a container where your plugin will be run. See the available containers fro Eclipse Che plugins https://github.com/che-dockerfiles/
  2. Create a meta.yaml file, see my example [1]. Basically you have to define your container and vsix files here.
  3. In the workspace configuration add a section with reference to your meta.yaml
-
    alias: apache-pig-plugin
    type: chePlugin
    reference: https://raw.githubusercontent.com/tolusha/plugins-registry/master/plugins/tolusha/apache-pig-debug/0.0.1/meta.yaml

[1] https://github.com/tolusha/plugins-registry/blob/master/plugins/tolusha/apache-pig-debug/0.0.1/meta.yaml

/cc @tsmaeder

I completed the following steps:

1. Prepare a docker container with all necessary dependencies. It is a container where your plugin will be run. See the available containers fro Eclipse Che plugins https://github.com/che-dockerfiles/

2. Create a `meta.yaml` file, see my example [1]. Basically you have to define your container and vsix files here.

3. In the workspace configuration add a section with reference to your `meta.yaml`
-
    alias: apache-pig-plugin
    type: chePlugin
    reference: https://raw.githubusercontent.com/tolusha/plugins-registry/master/plugins/tolusha/apache-pig-debug/0.0.1/meta.yaml

[1] https://github.com/tolusha/plugins-registry/blob/master/plugins/tolusha/apache-pig-debug/0.0.1/meta.yaml

This is the way I do it. There is also the option to run a custom plugin registry, but this may be overkill for your use case. This page has some more info.

@tolusha @ericwill
Thanks for the answer.
I tried following the instructions above, but when I modified the Devfile In the workspace configuration and ran the workspace, I faced an "_Error: Failed to start the workspace: "Plugin specified by reference URL 'https://github.com/leehyeongrak/plugins-registry/blob/master/plugins/leehyeongrak/jenkins-jack/1.0.0/meta.yaml' have missing required field 'publisher'.""_ message..

I obviously wrote a publisher in the meta.yaml file like https://github.com/leehyeongrak/plugins-registry/blob/master/plugins/leehyeongrak/jenkins-jack/1.0.0/meta.yaml

The vsix file is in https://github.com/leehyeongrak/vsixes/blob/master/jenkins-jack-1.0.0_vsixhub.com.vsix

And this is the code I wrote in the Devfile

  - type: chePlugin
    reference: >-
      https://github.com/leehyeongrak/plugins-registry/blob/master/plugins/leehyeongrak/jenkins-jack/1.0.0/meta.yaml
    alias: jenkins-plugin

I followed your example, but the results were the same...

What's wrong?

@tolusha @ericwill folks, I believe we need to document this and make it available on the official doc

@tolusha
It works! Thanks for helping me solve the problem!
@ibuziuk
I agree with you, it will be a good guide. I'll cheer you up!

I've reopened the issue since this information has to be documented.

@ericwill
I marked this issue as P1 since this question arises from time to time

It can probably be added as part of #14119, which I am working on at the moment.

It turns out this process is documented, just not as clearly as it should be. I've opened a PR to fix since it's a relatively straightforward clarification.

@leehyeongrak, this seems to have been fixed by https://github.com/eclipse/che-docs/pull/1074 -- could you please confirm it satisfies your expectations?

I think to close this issue we should move the section that explains how to test a vs code extension without adding it to a plugin registry at the top because as mentioned by @ericwill publishing the vscode extension in a plugin registry may be overkill for most of the cases.

Was this page helpful?
0 / 5 - 0 ratings