This documentation is for a release that is no longer maintained
See documentation for the latest supported version.此内容没有您所选择的语言版本。
Chapter 5. Selecting a workspace IDE
The default in-browser IDE in a new workspace is Microsoft Visual Studio Code - Open Source.
Because the OpenShift Dev Spaces build of Microsoft Visual Studio Code - Open Source supports custom branding, your organization might be using a branded build.
You can select another supported in-browser IDE by either method:
-
When you start a new workspace by visiting a URL, you can choose an IDE for that workspace by adding the
che-editorparameter to the URL. See Section 5.1, “Selecting an in-browser IDE for one new workspace”. -
You can specify an IDE in the
.che/che-editor.yamlfile of the Git repository for all new workspaces that will feature a clone of that repository. See Section 5.2, “Selecting an in-browser IDE for all workspaces that clone the same Git repository”.
| IDE | id | Note |
|---|---|---|
|
|
This is the default IDE that loads in a new workspace when the URL parameter or | |
|
| ||
|
| Deprecated and will be removed in a future release. |
5.1. Selecting an in-browser IDE for one new workspace 复制链接链接已复制到粘贴板!
You can select your preferred in-browser IDE when using a URL for starting a new workspace. This way, each developer using OpenShift Dev Spaces can start a workspace with a clone of the same project repository and the personal choice of the in-browser IDE.
Procedure
- Include the Section 2.2.2, “URL parameter for the workspace IDE” in the URL for starting a new workspace.
- Visit the URL in the browser.
Verification
- Verify that the selected in-browser IDE loads in the browser tab of the started workspace.
5.2.1. Setting up che-editor.yaml 复制链接链接已复制到粘贴板!
To define the same in-browser IDE for all workspaces that will clone the same remote Git repository of your project, you can use the che-editor.yaml file.
This way, you can set a common default editor for your team and provide new contributors with the most suitable editor for your project. You can also use the che-editor.yaml file when you need to set a different IDE default for a particular project repository rather than the default IDE of your organization’s OpenShift Dev Spaces instance.
Procedure
-
In the remote Git repository of your project, create a
/.che/che-editor.yamlfile with lines that specify the relevant parameter, as described in the next section.
Verification
- Visit the URL for starting a new workspace.
- Verify that the selected in-browser IDE loads in the browser tab of the started workspace.
5.2.2. 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 that is available in the table of supported in-browser IDEs in Chapter 5, Selecting a workspace IDE:
Example 5.1. id selects an IDE from the plugin registry
id: che-incubator/che-idea/latest
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 5.2. reference points to a remote che-editor.yaml file
reference: https://<hostname_and_path_to_a_remote_file>/che-editor.yaml
reference: https://<hostname_and_path_to_a_remote_file>/che-editor.yaml
Example 5.3. inline specifies a complete definition for a customized IDE without a plugin registry
For more complex scenarios, the che-editor.yaml file supports the registryUrl and override parameters:
Example 5.4. registryUrl points to a custom plugin registry rather than to the default OpenShift Dev Spaces plugin registry
id: <editor_id> registryUrl: <url_of_custom_plugin_registry>
id: <editor_id>
registryUrl: <url_of_custom_plugin_registry>
- 1
- The
idof the IDE in the custom plugin registry.
Example 5.5. override of the default value of one or more defined properties of the IDE
- 1
id:,registryUrl:, orreference:.