Skip to content

Commit 824100c

Browse files
committed
Documentation improvements per Suggested doc improvements #409
1 parent e277f12 commit 824100c

File tree

10 files changed

+81
-112
lines changed

10 files changed

+81
-112
lines changed

docs/Configuration.md

Lines changed: 65 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -2,107 +2,102 @@
22
layout: default
33
title: Configuration
44
permalink: /configuration/
5-
nav_order: 5
5+
nav_order: 3
66
---
77
# Configuration
88

9-
The settings that define an InterSystems IRIS server and the connection to the server are crucial to the functioning of VS Code in developing in ObjectScript.
9+
VS Code settings enable you to customize various aspects of its function. The InterSystems-provided extensions enable you to define InterSystems IRIS servers and the connections to those servers.
1010

11-
## Configuring a Server
11+
## Settings
12+
13+
Many available settings are general to VS Code, and you can learn about them in the [Visual Studio Code Documentation](https://code.visualstudio.com/docs). The InterSystems Server Manager and InterSystems ObjectScript extensions supply specific settings used to configure VS Code for ObjectScript development.
14+
There are several levels on which settings are stored and used:
15+
16+
- **User** - User settings are stored in a file location specific to you and apply globally to any instance of VS Code or any VS Code workspace that you open.
17+
- **Workspace** - Workspace settings are stored in a file inside the workspace and apply to anyone who opens the workspace.
18+
- **Folder** - If more than one folder is present in the workspace, you can select the folder where the settings file is stored by selecting from the Folder drop down list.
1219

13-
First, configure one or more servers. Open the settings editor by selecting **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **User** or **Workspace** settings level by selecting it at the top of the settings window. For example, the following screen shot shows Workspace selected:
20+
For example, the following screen shot shows Workspace selected:
1421

1522
![Workspace selected.](../assets/images/ClickWorkspace.png "workspace selected")
1623

17-
Find Extensions in the list in the left pane of the editor window, click to open, then select InterSystems Server Manager from the list to find the correct place in the settings UI. The following screen shot shows InterSystems Server Manager selected:
24+
See the VS Code documentation section [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings).
1825

19-
![Select server manager.](../assets/images/ServerManagerSelect.png "select server manager")
26+
## Configuring a Server
2027

21-
And this screen shot shows Server Manager area of the edit pane:
28+
First, configure one or more servers. Select **View > Command Palette > InterSystems Server Manager: Store Password in Keychain**. This command lets you define a new server, as well as storing a password. Click the plus sign in the upper right corner of the dialog, as shown:
2229

23-
![Server manager settings.](../assets/images/ServerManagerSettings.png "server manager settings")
30+
![Define New Server.](../assets/images/new-server.png "define new server")
2431

25-
You need to edit the server configuration in the settings.json file, so your only option is to click *Edit in settings.json*.
32+
Provide the following values when prompted:
2633

27-
To configure a server, enter code something like this:
34+
- **Name of new server definition** - an arbitrary name to identify this server
35+
- **Hostname or IP address of web server** - the host for this server
36+
- **Port of web server** - the WebServer port number for this server
37+
- **Username** - the username to use in logging in to this server.
38+
- **Confirm connection type** - the protocol used for connections, possible values are **http** and **https**.
2839

29-
```js
30-
"intersystems.servers": {
31-
"test": {
32-
"webServer": {
33-
"scheme": "http",
34-
"host": "localhost",
35-
"port": 52774,
36-
},
37-
"username": "_SYSTEM",
38-
},
39-
},
40-
```
40+
Once you have entered these values, the server definition is stored in your user settings. At that point another prompt appears, asking for a password to store in the system Keychain. Enter the password for the username supplied earlier to complete the process.
41+
42+
## Editing a Server Configuration
4143

42-
The components of this server definition are:
44+
If you need to modify a server configuration select **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **User** settings level. Find **Extensions** in the list in the left pane of the editor window, click to open, then select **InterSystems Server Manager** from the list to find the **InterSystems Server Manager** area of the edit pane, as illustrated in the following screen shot:
4345

44-
- **test** - an arbitrary name to identify this server
45-
- **webServer** - The collection of properties that define the web server.
46-
- **scheme** - The protocol used for connections.
46+
![Server manager settings.](../assets/images/ServerManagerSettings.png "server manager settings")
47+
48+
Click *Edit in settings.json*.
49+
50+
The server configuration in *settings.json* looks similar to the following, with the values you entered when you configured the server:
51+
52+
```json
53+
{
54+
"intersystems.servers": {
55+
"iris-1": {
56+
"webServer": {
57+
"scheme": "http",
58+
"host": "localhost",
59+
"port": 52773
60+
},
61+
"username": "_SYSTEM"
62+
}
63+
}
64+
}
65+
```
66+
The components of the server definition are as follows:
67+
68+
- **iris-1** - An arbitrary name to identify this server
69+
- **webServer** - The collection of properties that define the web server
70+
- **scheme** - The protocol used for connections
4771
- **host** - the host for this server
4872
- **port** - the WebServer port number for this server
49-
- **username** - the username to use in logging in to this server.
73+
- **username** - the username to use in logging in to this server
5074
- **password** - password for the specified username. Entering the password in this file is acceptable only in limited situations with very low need for security.
5175

52-
If you do not add a password to the server definition, anyone using the server needs to supply the password. Or, you can store the password securely in the system Keychain. The InterSystems Server Manager adds the following commands for managing stored passwords to the Command Palette:
76+
If you do not store the password securely in the system Keychain or add it to the server definition, anyone using the server needs to supply the password. The InterSystems Server Manager provides the following commands for managing stored passwords in the Command Palette:
5377

54-
- **InterSystems Server Manager: Clear Password from Keychain** - remove password for selected server
55-
- **InterSystems Server Manager: Store Password in Keychain** - select a server and enter a password
56-
- **InterSystems Server Manager: Test Server Selection**
57-
- **InterSystems Server Manager: Test Server Selection (flush cached credentials)**
58-
- **InterSystems Server Manager: Test Server Selection with Details**
78+
- **InterSystems Server Manager: Clear Password from Keychain** - remove the password for a selected server
79+
- **InterSystems Server Manager: Store Password in Keychain** - select a server or create a new one and enter a password
5980

6081
## Configuring a Server Connection
6182

62-
Select InterSystems ObjectScript from the settings editor extensions list. You need to edit the server configuration in the settings.json file, so your click *Edit in settings.json* under the heading **Objectscript: conn**.
83+
Open the folder where you want client-side files to be located. Select the **ObjectScript Explorer** button which has been added to the Activity Bar. Select the **Choose Server and Namespace** button. This action opens a dialog that lets you select a server, or create a new one. Once you have selected a server and namespace, connection configuration is complete.
84+
85+
## Editing a Server Connection
86+
87+
If you need to modify a server connection select **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) from the menu. Select the **Workspace** settings level. Search for **objectscript: conn**, and click on *Edit in settings.json*.
6388

64-
You should enter code something like this:
89+
The connection configuration looks like this:
6590

66-
```js
91+
```json
6792
"objectscript.conn": {
6893
"ns": "USER",
69-
"server": "tst",
94+
"server": "iris-1",
7095
"active": true,
7196
},
7297
```
73-
The components of this server definition are:
98+
99+
The components of this configuration are:
74100

75101
- **ns** - namespace to use on the server
76102
- **server** - server name as specified in the server configuration
77-
- **active** - specifies whether the connection is active.
78-
79-
## Configuring Export from Server
80-
81-
Select InterSystems ObjectScript from the settings editor extensions list. Find the section labeled **Objectscript: export**. You can edit many of the export settings in the settings editor. For others you need to edit the settings.json file.
82-
83-
You export configuration looks something like this:
84-
85-
```js
86-
"objectscript.export": {
87-
"folder": "",
88-
"addCategory": true,
89-
"atelier": true,
90-
"generated": false,
91-
"filter": "",
92-
"category": "*",
93-
"noStorage": false,
94-
"dontExportIfNoChanges": false,
95-
"maxConcurrentConnections": 0
96-
},
97-
```
98-
The components of this export definition are:
99-
100-
- **folder** - Folder for source code.
101-
- **addCategory** - Add a category folder to the export path.
102-
- **atelier** - Export source code as Atelier does, with packages placed in subfolders.
103-
- **generated** - Export generated source code files.
104-
- **filter** - An SQL filter that can be used to match the names.
105-
- **category** - Specifies a category of source code to export: CLS = classes; RTN = routines; CSP = csp files; OTH = other. The default is *, export everything.
106-
- **noStorage** - Strip the storage XML on export. This is useful for multiple systems.
107-
- **dontExportIfNoChanges** - Don't update the local file if the content is identical to what is on the server.
108-
- **maxConcurrentConnections** - The maximum number of export connections. (0 = Unlimited)
103+
- **active** - specifies whether the connection is active.

docs/Installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ Type `intersystems` in the search field to find these extensions in the Marketpl
2929

3030
![Search in Marketplace.](../assets/images/marketplace.png "search in marketplace")
3131

32-
For each of the listed extensions, click the extension, then click **install**. Note that the InterSystems ObjectScript extension adds an ObjectScript button to the Activity Bar:
32+
For the ObjectScript and Server Manager extensions, click the **install** button. Note that the InterSystems ObjectScript extension supplies an ObjectScript button which appears in the Activity Bar when a workspace or folder is open:
3333

3434
![ObjectScript button.](../assets/images/objectscript.png "objectscript button")

docs/RunDebug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
title: Running and Debugging
44
permalink: /rundebug/
5-
nav_order: 6
5+
nav_order: 4
66
---
77
# Running and Debugging
88

docs/ServerSide.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,28 @@
22
layout: default
33
title: Server-side Editing
44
permalink: /serverside/
5-
nav_order: 7
5+
nav_order: 5
66
---
7-
# Server-side Editing
7+
# VS Code Workspaces
8+
9+
To work with VS Code, you need to open a workspace. A VS Code workspace is usually just the root folder of your project. Workspace settings as well as debugging and task configurations are stored in the root folder in a folder called .vscode.
10+
11+
If you need to have more than one root folder in a VS Code workspace, use a feature called multi-root workspaces. See [Multi-root Workspaces](https://code.visualstudio.com/docs/editor/multi-root-workspaces) in the VS Code documentation.
12+
13+
A multi root workspace contains a \*.code-workspace file. The file can have any name followed by *.code-workspace*, for example `test.code-workspace`. The .code-workspace file stores information about what folders are in the workspace. Other settings that would otherwise be stored in the settings.json or launch.json file can be stored in the .code-workspace file. You can optionally have a workspace file even if you are not using the multi-root feature.
14+
15+
To edit a *.code-workspace* file in VS Code using the **InterSystems ObjectScript** extension, select **File > Preferences > Settings** (**Code > Preferences > Settings** on Mac) and select the Workspace option. When you click **Edit in settings.json**, VS Code opens the *.code-workspace* file for that workspace.
16+
17+
The **InterSystems ObjectScript** extension uses the multi-root workspaces feature to support ObjectScript development on the InterSystems server.
18+
19+
# Server-side Source Control
820

921
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`.
1022

1123
First configure the `intersystems.servers` entry for your server, as described in [Configuration](../configuration).
1224

1325
Next create a workspace for editing code direct on the server:
1426

15-
=======
1627
1. Open VS Code. If a folder or workspace is already open, close it, for example by pressing <kbd>Ctrl/Cmd</kbd>+<kbd>K</kbd>, releasing that keypair, then pressing <kbd>F</kbd>.
1728

1829
2. Open the Explorer view (<kbd>Ctrl/Cmd</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd>) if it is not already visible.

docs/Settings.md

Lines changed: 0 additions & 18 deletions
This file was deleted.
-6.99 KB
Loading

docs/assets/images/marketplace.png

17 KB
Loading

docs/assets/images/new-server.png

6.11 KB
Loading

docs/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ nav_exclude: true
77

88
* [Introduction](./introduction)
99
* [Installation](./installation)
10-
* [Workspace](./workspace)
11-
* [Settings](./settings)
1210
* [Configuration](./configuration)
1311
* [Running and Debugging](./rundebug)
1412
* [Server-side Editing](./serverside)

docs/workspace.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)