Configuring your workspace
Accessing settings
- In your workspace, click File > Settings > Open Preferences.
- In the Preferences tab, you can use the list of setting categories on the left to quickly navigate to settings of interest. For example, click the entry Zopeneditor to view settings related to IBM Z® Open Editor.
- All the preferences shown in the visual editor are represented as JSON. Complex preferences that are not just simple values must be entered by using the JSON editor itself. To open it, select the scope tab first: User tab or Workspace tab. For more information, see the differences between user preferences and workspace preferences.
- Then, open the JSON view by clicking Edit in settings.json, or by clicking the Open Preferences in JSON icon on the upper right of the editor.
- In the resulting JSON view, set all the mandatory configurations and set the optional configurations per your needs.
Mandatory configurations
The following configurations are required:
- Property groups are required to define how the COBOL, PL/I, and HLASM editors look for copybooks and include files when you edit a program. No defaults are configured, but you can refer to the JSON snippet provided in Setting property groups in the documentation of Wazi Developer for VS Code as a starting point.
- To run a user build, you must set up the user build first according to Setting up the user build in the documentation of Wazi Developer for VS Code.
- To debug your applications, before you connect to a z/OS® machine and start debugging, set up the connection and preferences for IBM Z Open Debug according to Setting up for IBM Z Open Debug.
Optional configurations
IBM Z Open Editor has default settings to identify the language of file opened in the editor, and you can further customize file associations according to Setting file associations in the documentation of Wazi Developer for VS Code.
You can also adjust the following configurations to control the characteristics of your environment according to your preference. The instructions are from the documentation of Wazi Developer for VS Code.
- Setting language-specific tab stops and rulers
- Enabling and disabling unreachable COBOL code warnings
- Customizing the Outline view
- Zowe Explorer temporary downloads folder location
-
All Wazi Developer for Workspaces stacks are preconfigured to store temporary files loaded from z/OS using Zowe™ Explorer in the
/projects/tempfolder. By default, Zowe Explorer uses this folder to keep the downloaded files for the editor to open, write, and save. However, if you create your own devfile or a different storage location, then you must either specify the Zowe temp folder location in your devfile or manually create the user setting. You can find more information on customizing your devfile in Using customized devfile to create a workspace. Steps for manually creating the user setting are as follows:- Open the menu File > Settings > Open Preferences. The Preferences
editor window is open and shows User and Workspace specific settings.Note: In this case, the term "Workspace" is different from a workspace within Wazi Developer for Workspaces. Here, "Workspace" refers to the directory in which your project files are stored.
- Select the User tab, open the JSON view, and then add the following JSON
object to the User settings to specify the path to the Zowe temp folder. You can customize the value
of
folderPathto be a different filepath if you want the Zowe temp folder to be located somewhere other than the/projectsdirectory."Zowe-Temp-Folder-Location": { "folderPath": "/projects" }The editor is saved automatically. Make sure that the JSON does not have any syntax errors and then close it.
- Ensure that there is no Zowe temp folder specified in Workspace preferences. In the Preferences
editor opened in Step 1, select the Workspace tab, and open the JSON view. If
there is an entry for
Zowe-Temp-Folder-Locationin the Workspacesettings.jsonfile, remove it to prevent this Workspace setting from overriding the User setting you added in Step 2.
- Open the menu File > Settings > Open Preferences. The Preferences
editor window is open and shows User and Workspace specific settings.
- Configuring Git
-
If you plan to integrate Git into your workspace, take extra steps to configure SSH and Git so that you can use Git via SSH with servers such as GitHub or GitLab. These steps are different than what are required for VS Code or Eclipse. For detailed steps, see Version Control in Red Hat CodeReady Workspaces documentation.
Reference: User preferences versus workspace preferences
In the editor panel, a list of preference groups is displayed, along with editor tabs for the User, Workspace, and Folder Preferences. Switch between these tabs to decide in which scope you want to add a preference. The workspace preferences override user preferences.
- User preferences
- User preferences apply to the current user across different workspaces. User preferences include not only typical user preferences related to accessibility, such as font sizes and editor behavior for code completion, but also z/OS® host connection information. These settings are not shared with other users. They are stored in the Theia container at the path
/home/theia/.theia/settings.json. - Workspace preferences
- Workspace preferences apply to the current workspace and are stored inside the
.theia/settings.jsonfile at the root of that workspace. Here, you can set preferences that should apply regardless of who is making edits, such as the Tab size, and path names for include files and other preferences. Unlike in VS Code, these workspace settings do not automatically get stored as part of the project in Git, although you can set this up as described in Sharing workspace settings. - Sharing workspace settings
- As described above, the default way for Wazi Developer for Workspaces to store workspace settings is
in a
.theiafolder one level above the code repository (or repositories, if you are working with multiple projects). Because the folder is not located within the repository, workspace settings do not automatically get shared as part of the repository. However, if your team wants to share workspace settings as part of the repository, you can do so by placing.theia/settings.jsonat the highest level within the repository's folder.
- Folder preferences do not work as expected in Wazi Developer 1.4.0 due to an defect in Eclipse Che. Therefore, you need to use either User or Workspace preferences.
- Workspace preferences have also changed their scope since the previous release. Workspace preferences now apply to all folders in the current workspace directory. The default workspace directory is /projects. Within that project directory, you can use folder preferences to override settings within each sub-folder, which currently do not work as expected.
- It is generally recommended to define these workspace settings in the devfile, as changing them in a running workspace will not be persisted.