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

User guide - Adding a VS Code extension #21296

Closed
l0rd opened this issue Mar 23, 2022 · 7 comments
Closed

User guide - Adding a VS Code extension #21296

l0rd opened this issue Mar 23, 2022 · 7 comments
Assignees
Labels
area/doc Issues related to documentation kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.

Comments

@l0rd
Copy link
Contributor

l0rd commented Mar 23, 2022

Is your enhancement related to a problem? Please describe

User Guide needs to be updated (global issue). This issue is about the creation of a new "Add a VS Code extension" section.

Describe the solution you'd like

This is specific to Che Theia and, of course, VS Code

We should warn that Che Theia VS Code extension support has some flaws and provide a link to Che Theia VS Code extensions compatibility API.

We should mention that it's possible to specify a VS Code extension in:

  • .vscode/extensions.json
  • .che/che-theia-plugins.yaml
  • in devfile.yaml attributes
    and give an example for any of them as well as pros and cons.

We should provide examples on how the property of an extension can be overridden for any of those scenarios.

We should also specify where the definitions of the VS Code extensions are (plugin registry gh repository, online instance and embedded instance) and how openvsx and Che plugin registry are related.

@l0rd l0rd added the kind/enhancement A feature request - must adhere to the feature request template. label Mar 23, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Mar 23, 2022
@l0rd l0rd added area/doc Issues related to documentation and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Mar 23, 2022
@l0rd l0rd added the severity/P1 Has a major impact to usage or development of the system. label Mar 23, 2022
@benoitf
Copy link
Contributor

benoitf commented Apr 14, 2022

closing as PR has been merged

@benoitf benoitf closed this as completed Apr 14, 2022
@Divine1
Copy link

Divine1 commented Jul 18, 2022

Hi @benoitf @l0rd

i have a doubt on adding extension to che-theia ide

i have an extensionId harmony-cbfsel.harmony-assist, this extension can be installed in any vscode by any users. i want this extension to be installed and available for use in the che-theia ide.
so, i added the attributes section in devfile.yaml. but i'm unable to find my extension harmony-cbfsel.harmony-assist in the che-theia ide. Please let me know how to install harmony-cbfsel.harmony-assist extension in che-theia ide

Please help me to fix this problem

i followed this documentation

schemaVersion: 2.1.0
metadata:
  name: cbfsel-repo
projects:
  - name: cbfsel-project
    git:
      checkoutFrom:
        revision: master
      remotes:
        origin: https://gitlab.myorg.com/cbf-sel.git
attributes:
  .vscode/extensions.json: |
    {
      "recommendations": [
        "harmony-cbfsel.harmony-assist"
      ]
    }
components:
  - container:
      image: 'artfact/qedocker/eclipseche/customopenjdk8:v10'
      memoryLimit: 4G
      volumeMounts:
        - name: m2volume
          path: /home/user/.m2
    name: javacontainer
  - container:
      image: 'artfact/eclipseche/selenium/standalone-chrome:4.3.0-20220706'
      memoryLimit: 4G
      endpoints:
        - exposure: public
          name: 4444-tcp
          protocol: tcp
          targetPort: 4444
        - exposure: public
          name: 5900-tcp
          protocol: tcp
          targetPort: 5900
        - exposure: public
          name: 7900-http
          protocol: http
          targetPort: 7900
          secure: true
    name: chromecontainer
  - name: m2volume
    volume:
      size: 4G
commands:
  - exec:
      commandLine: mvn clean package -DskipTests
      component: javacontainer
      group:
        isDefault: true
        kind: build
      label: 'build project using maven'
      workingDir: '${PROJECT_SOURCE}'
    id: mvnpackage

@benoitf
Copy link
Contributor

benoitf commented Jul 18, 2022

Hello @Divine1

using Che/Theia, the extension needs to be in the Che plug-in registry (here it's not so it will not add it)

Using VS Code/che integration, it will fetch it from open-vsx.org (and it's not there so it won't be seen as well)

VS Code marketplace is only available for VS Code product, 3rd party users can't use it. So you should probably provide your extension on open-vsx.org

@Divine1
Copy link

Divine1 commented Jul 18, 2022

@benoitf thank you for this quick response.

i will try to push my extension to open-vsx.org and share you the feedback

@Divine1
Copy link

Divine1 commented Jul 18, 2022

@benoitf
i have published my extension at https://open-vsx.org/extension/harmony/harmony-assist .

The extensionId is harmony.harmony-assist

i have updated my devfile.yaml as shown below. but still i dont see the extension harmony.harmony-assist in my che-theia ide . please let me know what am i missing.

image

schemaVersion: 2.1.0
metadata:
  name: cbfsel-repo
projects:
  - name: cbfsel-project
    git:
      checkoutFrom:
        revision: master
      remotes:
        origin: https://gitlab.myorg.com/cbf-sel.git
attributes:
  .vscode/extensions.json: |
    {
      "recommendations": [
        "harmony.harmony-assist"
      ]
    }
components:
  - container:
      image: 'artfact/qedocker/eclipseche/customopenjdk8:v10'
      memoryLimit: 4G
      volumeMounts:
        - name: m2volume
          path: /home/user/.m2
    name: javacontainer
  - container:
      image: 'artfact/eclipseche/selenium/standalone-chrome:4.3.0-20220706'
      memoryLimit: 4G
      endpoints:
        - exposure: public
          name: 4444-tcp
          protocol: tcp
          targetPort: 4444
        - exposure: public
          name: 5900-tcp
          protocol: tcp
          targetPort: 5900
        - exposure: public
          name: 7900-http
          protocol: http
          targetPort: 7900
          secure: true
    name: chromecontainer
  - name: m2volume
    volume:
      size: 4G
commands:
  - exec:
      commandLine: mvn clean package -DskipTests
      component: javacontainer
      group:
        isDefault: true
        kind: build
      label: 'build project using maven'
      workingDir: '${PROJECT_SOURCE}'
    id: mvnpackage

@benoitf
Copy link
Contributor

benoitf commented Jul 18, 2022

@Divine1 as I said previously, for Theia IDE, it requires to be in the che plug-in registry

here you published to OpenVSX.org so it'll work with VSCode/Che-code (not CheTheia)

@Divine1
Copy link

Divine1 commented Jul 18, 2022

@benoitf thank you for the response.

could you please help me know how can i publish my extension into che plug-in registry?
i looked into this link. but unable to find steps on how to publish my extension into che plug-in registry.

Any idea where can i find the steps to publish my extension into che plug-in registry?

in this git repo i found https://che-plugin-registry-main.surge.sh/v3 in devfile.yaml . is it possible to push my vscode extension to this registry?
image

@benoitf @l0rd please help me on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/doc Issues related to documentation kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants