Get to Know the User Interface for the InterSystems ObjectScript Extension Pack
When you install the InterSystems® ObjectScript Extension Pack for Visual Studio Code (VS Code), it adds additional capability to the VS Code user interface to support development in ObjectScript. This page summarizes those added capabilities.
For more information about the features of VS Code’s standard UI, refer to the section User InterfaceOpens in a new tab in the VS Code documentation.
Explorer View Context Menu Enhancements
The Explorer view is a standard VS Code view which allows you to view and organize directories and files within your open workspace. Access the Explorer view by selecting the Explorer button from the Activity Bar.
The InterSystems extension pack adds the following items to context menus within this view:
-
Add Server Namespace to Workspace... in the context menu of folders
-
Import and Compile in the context menu of folders and files when a workspace is connected to an InterSystems server for client-side editing.
-
Import Without Compilation in context menu of folders and files when a workspace is connected to an InterSystems server for client-side editing.
-
Server Command Menu... — Allows you to select a command from menus which are defined by a source control class on the server.
-
Server Source Control... — Allows you to select a command from menus which are defined by a source control class on the server.
InterSystems View Container
The InterSystems extension pack provides most of the capabilities necessary to support development within the InterSystems view container. To access the InterSystems view container, select the InterSystems button in the Activity bar.
By default, the InterSystems view container includes three views, as illustrated in the following screenshot:
These views include:
-
The InterSystems Servers view, which you can use to manage connections to your InterSystems servers and add server-side virtual folders to your workspace.
-
The ObjectScript Explorer view, which you can use to explore files on a connected InterSystems server.
-
The InterSystems Projects Explorer view, which you can use to create, manage, and explore projects. For more information on using this view, see Work with Projects.
When there is no workspace open in the Explorer, only the InterSystems Servers view is available. Connect to an InterSystems server or open a document within the Explorer to display the ObjectScript Explorer and InterSystems Projects Explorer.
Views within the InterSystems view container can be dragged to a different view container. This means, for example, that you could move the InterSystems Servers view into VS Code’s main Explorer view container.
When a VS Code container has only a single view in it, the view header merges with the container header, with the two names separated by a colon.
InterSystems Servers
This view displays a directory tree outlining the contents of servers for which you have configured connection profiles, as illustrated by the following image:
The view groups servers into a several folders: servers currently in use, user-defined favorites, and servers which have been recently used. Within the view, you can perform operations on the servers. When you move the cursor over a server listing, command buttons appear which let you mark the server as a favorite, open the server’s Management Portal in VS Code’s built-in Simple Browser, or open the server’s Management Portal in an external browser, as illustrated by the following images:
When you move the cursor over a namespace within a server, command buttons appear which let you add a server-side virtual folder for that namespace within your current workspace, as illustrated by the following image:
Notes About the VS Code Simple Browser
The Simple Browser uses iframes to embed web pages within VS Code. Beginning with InterSystems IRIS 2024.1, the Management Portal restricts iframe embedding. This means that if your server version is InterSystems IRIS 2024.1 or later, the Open Management Portal in Tab button does not work. The Open Management Portal in External Browser button is unaffected.
Only one Simple Browser tab can be open at a time, so launching a second server’s Management Portal replaces the previous one.
To use the Simple Browser when the server version is between InterSystems IRIS 2020.1.1 and InterSystems IRIS 2023.3, you need to change a setting on the suite of web applications that implement Management Portal. The Simple Browser is not permitted to store the Portal’s session management cookies, so the Management Portal must be willing to fall back to using the CSPCHD query parameter mechanism.
To do so:
-
In Management Portal, select System Administration > Security > Applications > Web Applications.
-
Enter /csp/sys in the filter field to find the web applications which have paths beginning with /csp/sys.
-
For each application:
-
Select the link in the Name column to edit the application definition.
-
In the section labeled Session Settings, change the value of Use Cookie for Session from Always to Autodetect.
-
Select Save to save the change.
-
This change should not affect the use of session cookies on ordinary browsers.
ObjectScript Explorer
When a VS Code workspace is open but it is not connected to an InterSystems IRIS server, the ObjectScript Explorer provides a button that lets you select a server and namespace to connect to. Once the workspace is connected to an InterSystems server, the ObjectScript Explorer shows files on the server, grouped by type of file.
If the current workspace is configured for server-side editing, the ObjectScript Explorer is not available. In this configuration, the Explorer view lists files on the server, not on the local machine, making the ObjectScript Explorer view irrelevant.
Server Connection Status Bar
The connection status of the current server can be seen in the VS Code status barOpens in a new tab. If the server connection is active, the connected server and namespace will be shown in the status bar. If the server connection info is defined in the intersystems.servers settings object, the name of the server and namespace appears:
Otherwise, the host, port, and namespace appear:
Hover over the status bar item to see more detailed connection information, like a full connection URL and the username of the connection. Click on the status bar item to open the Server Actions menu.
If the server connection is inactive, the status bar displays the connection info or the word ObjectScript will be shown, along with an error or warning icon:
Hover over the status bar item to see more detailed error information. Click on the status bar item to open a menu that will help you activate your connection.