Skip to content

Commit 37ad71e

Browse files
authored
Merge pull request #668 from intersystems-community/ss-folder-settings-384
resolves issues #384, #425
2 parents 36fddf8 + 9ebbe1d commit 37ad71e

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

docs/ServerSide.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ permalink: /serverside/
55
nav_order: 6
66
---
77

8-
# Configuration for Server-side Editing
8+
# Server-side Editing
99

1010
You can configure the InterSystems ObjectScript extension to edit code directly on the server, using the [multi-root workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) VS Code feature. This type of configuration is useful in cases where source code is stored in a Source Code Management (SCM) product interfaced to the server. For example you might already be using the Source Control menu in InterSystems Studio or Portal, implemented by a source control class that extends `%Studio.SourceControl.Base`.
1111

12-
First configure the `intersystems.servers` entry for your server, as described in [Configuration](../configuration).
12+
{: #config-server-side}
13+
## Configuring for Server-side Editing
14+
15+
First configure the `intersystems.servers` entry for your server, as described in [Configuring a Server](../configuration#config-server).
1316

1417
Next create a workspace for editing code directly on the server:
1518

@@ -30,7 +33,7 @@ Next create a workspace for editing code directly on the server:
3033
![Choose an access type.](../assets/images/ss-access-type.png "choose an access type")
3134
1. If you want to reopen this workspace in the future, use the command **File > Save Workspace As...** to save it as a `.code-workspace` file.
3235

33-
Note that the ObjectScript button is not visible in the Activity Bar, because the files listed in the Explorer view are all on the server, so it is not needed for this configuration.
36+
Note that the ObjectScript button is not visible in the Activity Bar. Because the files listed in the Explorer view are all on the server, it is not needed for this configuration.
3437

3538
The `.code-workspace` file is a JSON file which you can edit directly, as described in the section [VS Code Workspaces](../configuration/#code-workspaces). A simple example looks like this:
3639
```json
@@ -75,6 +78,47 @@ Workspaces can also consist of a mixture of server-side folders and local folder
7578

7679
Root folders can be re-sequenced using drag/drop in the Explorer view, or by editing the order their definition objects appear within the `folders` array in the JSON.
7780

81+
## Configuring Storage for Folder-specific Settings
82+
83+
When you use VS Code to edit source code on the client, the settings model allows you to specify folder-specific settings in a `.vscode\settings.json` file located in a workspace root folder. These settings take precedence when you work under that workspace root folder.
84+
85+
If you use an isfs-type workspace to operate directly in a namespace on a server, you need to configure that server to support storing and serving up the `.vscode\settings.json` file. The `.vscode` subfolder of a workspace root folder also stores folder-specific code snippets and debug configurations. These are available when using this configuration.
86+
87+
Use the **Management Portal** to create a web application named **_vscode** on the server. Select **System Administration > Security > Applications > Web Applications**, then **Create New Web Application**:
88+
89+
![Create a web application.](../assets/images/web-app.png "create a web application")
90+
91+
Enter the following values:
92+
93+
- **Name** - /_vscode
94+
- **Description** - enter a brief description
95+
- **Namespace** - select **%SYS**
96+
- **Enable Application** - select
97+
- **Enable** - select **CSP/ZEN**
98+
- **Allowed Authentication Methods** - select **Password**
99+
- **CSP File Settings: Physical Path** - enter a physical path appropriate for your platform and install folder
100+
- **CSP File Settings: Web Settings** - Clear **Auto Compile**
101+
102+
Be sure to save the configuration. If you have an isfs-type workspace root folder that connects to a namespace on this server, it can now write and read folder-specific settings:
103+
104+
![The server settings folder.](../assets/images/ss-settings-folder.png "the server settings folder")
105+
106+
You can also create a folder-specific snippets file via **Preferences: Configure User Snippets**:
107+
108+
![server-side snippets.](../assets/images/ss-snippets.png "server-side snippets")
109+
110+
To edit the server-side namespace-specific files for all namespaces directly through VS Code, add an isfs-type root folder with the following uri:
111+
112+
```
113+
isfs://servername:%sys/_vscode?csp
114+
```
115+
116+
For a single namespace (for example, USER):
117+
118+
```
119+
isfs://servername:%sys/_vscode/USER?csp
120+
```
121+
78122
## Web Application (CSP) Files
79123

80124
To edit web application files (also known as CSP files) on a server, configure the uri as `isfs://myserver:xxx{csp_application}?csp`
16.5 KB
Loading

docs/assets/images/ss-snippets.png

12.8 KB
Loading

docs/assets/images/web-app.png

61.3 KB
Loading

0 commit comments

Comments
 (0)