|
| 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 | + |
| 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 | + |
| 28 | + |
| 29 | +### Viewing Server Resources |
| 30 | + |
| 31 | +This view shows server resources in a tree format. |
| 32 | + |
| 33 | + |
| 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 | +-  |
| 38 | +-  |
| 39 | +-  |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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 | + |
| 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...**. |
0 commit comments