Define a common IDE

Define a common IDE for all workspaces in a Git repository by using a che-editor.yaml file so that all team members and new contributors use the most suitable IDE for the project. You can also use this file to override the Che instance default IDE for a particular Git repository.

To use an IDE other than the default Microsoft Visual Studio Code - Open Source for most or all workspaces in your organization, an administrator can set .spec.devEnvironments.defaultEditor in the CheCluster Custom Resource to apply the change at the instance level.

Prerequisites
  • You have a project source code repository hosted on a Git provider.

Set up che-editor.yaml

By using the che-editor.yaml file, you can set a common default IDE for your team and provide new contributors with the most suitable IDE for your project source code. You can also use the che-editor.yaml file when you need to set a different IDE default for a particular source code Git repository rather than the default IDE of your organization’s Che instance.

Procedure
  • In the remote Git repository of your project source code, create a /.che/che-editor.yaml file with lines that specify the relevant parameter.

Verification
  1. Start a new workspace with a clone of the Git repository.

  2. Verify that the specified IDE loads in the browser tab of the started workspace.

Parameters for che-editor.yaml

The simplest way to select an IDE in the che-editor.yaml is to specify the id of an IDE from the table of supported IDEs:

Table 1. Supported IDEs
IDE Status id Note

Microsoft Visual Studio Code - Open Source

Available

  • che-incubator/che-code/latest

  • che-incubator/che-code/insiders

  • latest is the default IDE that loads in a new workspace when the URL parameter or che-editor.yaml is not used.

  • insiders is the development version.

JetBrains IntelliJ IDEA Ultimate Edition (over JetBrains Gateway)

Available

  • che-incubator/che-idea-server/latest

  • che-incubator/che-idea-server/next

  • latest is the stable version.

  • next is the development version.

Example 1. id selects an IDE from the plugin registry
id: che-incubator/che-idea/latest

As alternatives to providing the id parameter, the che-editor.yaml file supports a reference to the URL of another che-editor.yaml file or an inline definition for an IDE outside of a plugin registry:

Example 2. reference points to a remote che-editor.yaml file
reference: https://<hostname_and_path_to_a_remote_file>/che-editor.yaml
Example 3. inline specifies a complete definition for a customized IDE without a plugin registry
inline:
  schemaVersion: 2.1.0
  metadata:
    name: JetBrains IntelliJ IDEA Community IDE
  components:
    - name: intellij
      container:
        image: 'quay.io/che-incubator/che-idea:next'
        volumeMounts:
          - name: projector-user
            path: /home/projector-user
        mountSources: true
        memoryLimit: 2048M
        memoryRequest: 32Mi
        cpuLimit: 1500m
        cpuRequest: 100m
        endpoints:
          - name: intellij
            attributes:
              type: main
              cookiesAuthEnabled: true
              urlRewriteSupported: true
              discoverable: false
              path: /?backgroundColor=434343&wss
            targetPort: 8887
            exposure: public
            secure: false
            protocol: https
      attributes: {}
    - name: projector-user
      volume: {}

For more complex scenarios, the che-editor.yaml file supports the registryUrl and override parameters:

Example 4. registryUrl points to a custom plugin registry rather than to the default Che plugin registry
id: <editor_id> (1)
registryUrl: <url_of_custom_plugin_registry>
1 The id of the IDE in the custom plugin registry.
Example 5. override of the default value of one or more defined properties of the IDE
... (1)
override:
  containers:
    - name: che-idea
      memoryLimit: 1280Mi
      cpuLimit: 1510m
      cpuRequest: 102m
    ...
1 id:, registryUrl:, or reference:.