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

Add VS code extensions preferences in workspace configuration #12992

Closed
l0rd opened this issue Mar 27, 2019 · 6 comments · Fixed by eclipse-che/che-theia#228
Closed

Add VS code extensions preferences in workspace configuration #12992

l0rd opened this issue Mar 27, 2019 · 6 comments · Fixed by eclipse-che/che-theia#228
Assignees
Labels
severity/P1 Has a major impact to usage or development of the system.

Comments

@l0rd
Copy link
Contributor

l0rd commented Mar 27, 2019

Description

For example it should be possible to override the default JDT LS vmargs to match the sidecar container memory settings. Today that's not possible and we have 2 workarounds that are not really satisfactory:

  • use a sidecar with > 1.5GB (may be too much for che.openshift.io)
  • start the workspace and edit the JTD LS vmargs from Theia settings (but the UX is awful)

That same problem will exist for any VS Code plugin that has some defaults that may not work well when they run in a container.

Here is a proposal to include that in a devfile and workspace.config:

  - name: java support
    type: chePlugin
    id: 'org.eclipse.che.vscode-redhat.java:0.38.0'
    preferences:
       java.jdt.ls.vmargs: '-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication'
       java.home: '/home/user/jdk11'

devfile

and in json config

"attributes": {
  "plugin.org.eclipse.che.vscode-redhat.java.java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
  "plugin.org.eclipse.che.vscode-redhat.java.java.home": "/home/user/jdk11"
...
}

workspace config

@l0rd l0rd added target/che7GA severity/P1 Has a major impact to usage or development of the system. labels Mar 27, 2019
@garagatyi
Copy link

@l0rd who should take these preferences from workspace config and incorporate them in Theia? Some Che-theia extension, right?

@l0rd
Copy link
Contributor Author

l0rd commented Mar 27, 2019

@garagatyi I don't know what's the best way to implement that. We need some Theia specialists here cc @benoitf @evidolob @azatsarynnyy

@azatsarynnyy
Copy link
Member

There's the Theia extension in Che Theia that is responsible for mapping/synchronizing the Theia Settings with the Che User Preferences. I think that extension suits perfect for performing such an additional job. E.g., on Theia start, the extension can look into the Che Workspace config attributes and add the corresponded Theia settings if they don't exist yet.

@azatsarynnyy
Copy link
Member

azatsarynnyy commented Mar 27, 2019

Also, that Theia extension should take into account that not all of the Che Workspace attributes are the settings for Theia.
The extension should be able to distinguish it. Such attributes can be prefixed with preference, e.g.:

"attributes": {
  "plugin.org.eclipse.che.vscode-redhat.java.preference.java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
  "plugin.org.eclipse.che.vscode-redhat.java.preference.java.home": "/home/user/jdk11"
...
}

@tsmaeder
Copy link
Contributor

Can we please get rid of that syntax that matches part of the plugin id and have some section per plugin? This current way is super confusing and error-prone.

@benoitf
Copy link
Contributor

benoitf commented Mar 27, 2019

@tsmaeder : well I would say it's because workpace config is only allowing attributes in the current model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants