Skip to content

Commit 875761c

Browse files
committed
Document new features for ServerManager 2.0
1 parent 6d2899b commit 875761c

22 files changed

+157
-36
lines changed

docs/.vscode/settings.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +0,0 @@
1-
{
2-
"objectscript.conn": {
3-
"server": "default~iris",
4-
"ns": "USER",
5-
"active": true
6-
}
7-
}

docs/Configuration.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@
22
layout: default
33
title: Configuration
44
permalink: /configuration/
5-
nav_order: 3
5+
nav_order: 4
66
---
7-
# Configuration
7+
# Configuration
88

99
VS Code settings enable you to customize various aspects of its function. The InterSystems extensions provide settings used to configure VS Code for ObjectScript development.
1010

11+
{: #code-workspaces}
12+
## VS Code Workspaces
13+
14+
To work with VS Code, you need to open a workspace. A VS Code workspace can be just the root folder of your project. Workspace settings and task configurations are stored in the root folder in the `settings.json` file in a folder called `.vscode`. Debugging launch configurations are stored in `launch.json`, also in `.vscode`.
15+
16+
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.
17+
18+
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 files 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.
19+
20+
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 level. Search for **objectscript: conn**, and click on *Edit in settings.json*. VS Code opens the `*.code-workspace` file for that workspace.
21+
22+
The **InterSystems ObjectScript** extension uses the multi-root workspaces feature to support ObjectScript development on the InterSystems server.
23+
1124
## Settings
1225

1326
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 additional settings you can use to define InterSystems IRIS servers and connections to those servers.
@@ -24,6 +37,7 @@ For example, the following screen shot shows the Workspace level selected:
2437

2538
See the VS Code documentation section [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings).
2639

40+
{: #config-server}
2741
## Configuring a Server
2842

2943
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 and securely store a password in the system keychain. Click the plus sign in the upper right corner of the dialog, as shown:
@@ -40,6 +54,8 @@ Provide the following values when prompted:
4054

4155
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. Storing a password is optional. You can terminate the process and store the server configuration by pressing either **Escape** or **Return**. If you do not store a password, users are prompted for a password each time they connect to the server.
4256

57+
To remove a password from the keychain, Select **View > Command Palette > InterSystems Server Manager: Clear Password from Keychain**. The commands to both store and clear passwords are also available from the server context menu in the InterSystems Tools view.
58+
4359
You can create a configuration for a server that is not currently running.
4460

4561
## Editing a Server Configuration
@@ -50,6 +66,10 @@ If you need to modify a server configuration select **File > Preferences > Setti
5066

5167
Click *Edit in settings.json*.
5268

69+
The InterSystems Tools view provides an alternate path to this `settings.json` file. Click the `...` button and select **Edit Settings**.
70+
71+
![Edit settings.](../assets/images/edit-settings.png "edit settings")
72+
5373
The server configuration in *settings.json* looks similar to the following, with the values you entered when you configured the server:
5474

5575
```json

docs/ExtensionUI.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
---
2+
layout: default
3+
title: InterSystems Extensions UI
4+
permalink: /extensionui/
5+
nav_order: 3
6+
---
7+
# InterSystems Extensions User Interface
8+
9+
The InterSystems extensions add additional capability to the VS Code user interface to support development in ObjectScript. These additions are based on the standard VS Code UI, which is described in the section [User Interface](https://code.visualstudio.com/docs/getstarted/userinterface) in the VS Code documentation.
10+
11+
## Explorer View
12+
13+
Select the Explorer view button in the Activity Bar to open the view.
14+
15+
![Explorer view button.](../assets/images/explorer.png "explorer view button")
16+
17+
The Explorer view is a standard VS Code view. InterSystems extensions add the following items to context menus in the this view:
18+
19+
- **Add Server Namespace to Workspace...** - in context menu of folders
20+
- **Import and Compile** - in context menu of folders and files
21+
- **Import Without Compilation** - in context menu of folders and files
22+
23+
## InterSystems Tools View
24+
25+
The InterSystems Server Manager extension supplies an InterSystems Tools view. Select the InterSystems Tools view button in the Activity Bar to open the view.
26+
27+
![InterSystems Tools button.](../assets/images/intersystems-tools.png "intersystems tools button")
28+
29+
### Viewing Server Resources
30+
31+
This view shows server resources in a tree format.
32+
33+
![Server tree view.](../assets/images/server-tree-view.png "server tree view")
34+
35+
As you can see, the view groups servers into a variety of folders, such as currently in use, favorites, and recently used. Within the view, you can perform operations on the servers. When you move the cursor over a server listing, you see controls to mark the server as a favorite, and open the management portal for the server in either the simple browser in a VS Code tab, or an external browser:
36+
37+
- ![Add to starred.](../assets/images/add-to-starred.png "add to starred")
38+
- ![Open management portal in tab.](../assets/images/management-portal-tab.png "open management portal the simple browser in VS Code")
39+
- ![Open management portal in browser.](../assets/images/management-portal-browser.png "open management portal in browser")
40+
41+
Notes About the VS Code Simple Browser
42+
43+
Only one Simple Browser tab can be open at a time, so launching a second server's Management Portal replaces the previous one.
44+
45+
If the server version is InterSystems IRIS 2020.1.1 or later you need to change a setting on the suite of web applications that implement Management Portal. The Simple Browser is not be permitted to store the Portal's session management cookies, so the Portal must be willing to fall back to using the CSPCHD query parameter mechanism.
46+
47+
In the management portal, select **System Administration > Security > Applications > Web Applications**. Enter `/csp/sys` in the **filter** field to find the five web applications whose path begins with `/csp/sys`.
48+
49+
![Portal web app list.](../assets/images/five-web-apps.png "portal web app list")
50+
51+
For each application, select the link in the **name** column to edit the application definition. In the section labeled **Session Settings**, change the the value of **Use Cookie for Session** from **Always** to **Autodetect**.
52+
53+
![Edit session setting.](../assets/images/edit-webapp.png "edit session setting")
54+
55+
Save the change. This change is not thought to have any adverse effects on the usage of Portal from ordinary browsers, which continue to use session cookies.
56+
57+
### Viewing and Editing Source Code on the Server
58+
59+
Expand the target server, then expand its **Namespaces** folder. Hover over the target namespace to reveal its command buttons:
60+
61+
![Namespace edit buttons.](../assets/images/namespace-buttons.png "namespace edit buttons")
62+
63+
- Click the **edit pencil** button to add an isfs://server:namespace/ folder to your VS Code workspace.
64+
- Click the **viewing eye** button to add an isfs-readonly://server:namespace/ folder to your VS Code workspace.
65+
- Hold the **alt** or **option** key while clicking the edit or view button to add a folder that gives you access to server-side web application files (for example, CSP files).
66+
67+
Once you have added a server-side namespace to the workspace, VS Code opens the Explorer view showing the added namespace. The following screen shot shows the **Sample** and **User** packages in the **src** folder on the client, and the **Sample** and **User** packages in the **USER** namespace on the server, with read-only access.
68+
69+
![Client-side and server-side namespaces.](../assets/images/client-server.png "client-side and server-side namespaces")
70+
71+
Learn more about isfs and isfs-readonly folders in the section [Configuration for Server-side Editing](../serverside).
72+
73+
If you are already doing client-side editing of your code, for example, managing it with Git, be sure you understand the consequences of also doing server-side editing using isfs. The ObjectScript extension's README outlines the differences between client-side and server-side editing. If in doubt, limit yourself to isfs-readonly by only using the eye icon.
74+
75+
### Adding a Server
76+
77+
You can use the plus sign (`+`) at the top of the view to add a server. This control provides an additional entry point to the process described in the section [Configuring a Server](../configuration/#config-server).
78+
79+
![Add server.](../assets/images/add-server.png "add server")
80+
81+
The server definition is added to your user-level *settings.json* file and also appears at the top of the 'Recent' folder.
82+
83+
### Server Context Menu
84+
85+
Servers listed in the InterSystems Tools view provide a context menu which provides access to several commands, including storing and clearing passwords in the keychain.
86+
87+
![Server conext menu.](../assets/images/server-context-menu.png "server context menu")
88+
89+
A submenu enables you to set the color of the icon to the left of the server name. The following screen shot shows this menu, and the icon color set to red.
90+
91+
![Set icon color.](../assets/images/set-icon-color.png "set icon color")
92+
93+
### Import Server Connections
94+
95+
On Windows, the Server Manager can create connection entries for all connections you previously defined with the original Windows app called InterSystems Server Manager. This action is available from the '...' menu at the top right corner of Server Manager's tree, as shown in the following screen shot.
96+
97+
![Import servers from registry.](../assets/images/import-servers.png "import servers from registry")
98+
99+
## ObjectScript View
100+
101+
The InterSystems ObjectScript extension supplies an ObjectScript view. The button to select this view appears in the Activity Bar only when a workspace or folder is open:
102+
103+
![ObjectScript button.](../assets/images/objectscript.png "objectscript button")
104+
105+
When a VS Code workspace is not connected to an InterSystems IRIS server, the ObjectScript view provides a button that lets you select a server and namespace. Once the workspace is connected to an InterSystems IRIS server, the ObjectScript view shows files on the server, grouped by type of file.
106+
107+
If the workspace is configured for server-side editing, the ObjectScript view is not available. In this configuration, the Explorer view lists files on the server, not on the local machine, making the ObjectScript view irrelevant.
108+
109+
The ObjectScript view provides the following items:
110+
111+
- **Compile** - Compiles files on the server.
112+
- **Delete** - Deletes files from the server.
113+
- **Export** - Exports files to the workspace on the client.
114+
- **Server Command Menu...** - Pick a command from menus configured on the server.
115+
- **Server Source Control...** - Pick a command from menus configured on the server.
116+
117+
The InterSystems IRIS documentation section [Extending Studio](https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=ASC#ASC_Hooks_extending_studio ) describes how to configure menus for source code control and other purposes. Entries from menus named **%SourceMenu** and **%SourceContext** appear in the **Server Source Control...** quickpick provided the source control class doesn't disable the entry, for example, disabling checkout if it knows that the file is already checked out.
118+
119+
Entries from menus with any other name appear in the **Server Command Menu...**.

docs/Installation.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ nav_order: 2
88

99
## Install VS Code
1010

11-
Your first step is to install VS Code:
11+
Your first step is to install VS Code:
1212

1313
1. Go to the [Visual Studio Code download page](https://code.visualstudio.com/).
14-
2. Download an appropriate build for your platform.
15-
3. Open the downloaded file and follow the installation instructions.
14+
1. Download an appropriate build for your platform.
15+
1. Open the downloaded file and follow the installation instructions.
1616

1717
## Install the InterSystems ObjectScript Extensions
1818

@@ -30,6 +30,4 @@ Type `intersystems` in the search field to find these extensions in the Marketpl
3030

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

33-
You can install all the required extensions in one step by clicking on the **Install** button for the InterSystems ObjectScript Extension Pack. You can also install each extension separately by clicking the **install** button for the required extension. Note that the InterSystems ObjectScript extension supplies an ObjectScript button which appears in the Activity Bar when a workspace or folder is open:
34-
35-
![ObjectScript button.](../assets/images/objectscript.png "objectscript button")
33+
You can install all the required extensions in one step by clicking on the **Install** button for the InterSystems ObjectScript Extension Pack. You can also install each extension separately by clicking the **install** button for the required extension.

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: 4
5+
nav_order: 5
66
---
77
# Running and Debugging
88

docs/ServerSide.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22
layout: default
33
title: Server-side Editing
44
permalink: /serverside/
5-
nav_order: 5
5+
nav_order: 6
66
---
7-
{: #code-workspaces}
8-
# VS Code Workspaces
97

10-
To work with VS Code, you need to open a workspace. A VS Code workspace can be 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.
11-
12-
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.
13-
14-
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 files 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.
15-
16-
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 level. Search for **objectscript: conn**, and click on *Edit in settings.json*. VS Code opens the *.code-workspace* file for that workspace.
17-
18-
The **InterSystems ObjectScript** extension uses the multi-root workspaces feature to support ObjectScript development on the InterSystems server.
19-
20-
# Configuration for Server-side Editing
8+
# Configuration for Server-side Editing
219

2210
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`.
2311

@@ -44,13 +32,13 @@ Next create a workspace for editing code directly on the server:
4432

4533
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.
4634

47-
The `.code-workspace` file is a JSON file which you can edit directly, as described in the section [VS Code Workspaces](#code-workspaces). A simple example looks like this:
35+
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:
4836
```json
4937
{
5038
"folders": [
5139
{
5240
"name": "iris184:USER",
53-
"uri": "isfs://iris184:user/"
41+
"uri": "isfs://iris184:user"
5442
}
5543
],
5644
"settings": {}
@@ -59,8 +47,10 @@ The `.code-workspace` file is a JSON file which you can edit directly, as descri
5947
- The `name` property provides a name for this server-side folder.
6048
- The `uri` property indicates the location of resources on the server. The supplied value has three components:
6149
- The first component can be either `isfs` or `isfs-readonly`. These values specify that this folder is on an InterSystems IRIS server. `isfs-readonly` specifies read-only access.
62-
- The value following `://` specifies the name of the server.
63-
- The value following the next `:` specifies the namespace (lowercase).
50+
- The value following `/` specifies the name of the server.
51+
- The value following `:` specifies the namespace (lowercase).
52+
53+
The string `isfs` which appears in the **uri** for folders configured for server-side editing is an abbreviation created by InterSystems which stands for **InterSystems File Service**. It implements the VS Code [FileSystemProvider API](https://code.visualstudio.com/api/references/vscode-api#FileSystemProvider), which let's you make any remote location look like a local one. It was designed for common things like FTP servers, but it works well for making artefacts in an InterSystems IRIS database namespace look like local files.
6454

6555
To add more root folders to your workspace, giving you access to code in a different namespace, or on a different server, use the context menu on your existing root folder to invoke the `Add Server Namespace to Workspace...` command. This command is also available on the Command Palette.
6656

@@ -70,11 +60,11 @@ An example of a two-folder workspace in which the second folder gives read-only
7060
"folders": [
7161
{
7262
"name": "iris184:USER",
73-
"uri": "isfs://iris184:user/"
63+
"uri": "isfs://iris184:user"
7464
},
7565
{
7666
"name": "iris184:%SYS (read-only)",
77-
"uri": "isfs-readonly://iris184:%sys/"
67+
"uri": "isfs-readonly://iris184:%sys"
7868
}
7969
],
8070
"settings": {}

docs/assets/images/add-server.png

5.42 KB
Loading

docs/assets/images/add-to-starred.png

5.15 KB
Loading

docs/assets/images/client-server.png

15.3 KB
Loading

docs/assets/images/edit-settings.png

10.6 KB
Loading

0 commit comments

Comments
 (0)