Enhancements
WorkspaceSymbolProvider (#772)Open Shell in Docker option to Server Actions menu (#778)Fixes
FileSystemProvider mtime caching (#770)Fixes
Enhancements
Fixes
/api/atelier web application is disabled or missing (#752)Require confirmation before compiling all code in namespace (#677)
Respect maxResults parameter when running server-side search (#713)
Handle multiple spaces between Class keyword and classname (#717)
Report license starvation connection error properly (#721)
Display AfterUserAction errors reported by server-side source control (#701)
Preserve user edit if it triggered a successful checkout in server-side source control (#703)
Fix failing Go to Definition from CSP file when working with isfs (#727)
Support 'Open Document' action by server-side source control (#731)
Upgrade vulnerable dependency.
Add Watchpoint support to debugging (#697)
Make QuickOpen respect any filter=xxx query parameter on the isfs folder definition (#593)
Fix unexpected alerts about server-side copy being newer when working with isfs (#683)
Always run isfs dialog's serverInfo request in the %SYS namespace (#682)
Fix "Cannot read property 'toLowerCase' of undefined" error on startup (#693)
Report problem if isfs workspace definition points to non-existent server definition (#695)
Give clearer messages if user has insufficient privilege on the server (#678)
Allow opting out of 'Other Studio Action' server-side source control calls (#691)
Allow extension to work in untrusted workspaces.
Don't switch to File Explorer view when opening a file from ObjectScript Explorer (#651)
Scroll to correct line after an Output panel link is clicked (#657)
Handle compilation errors better (#673)
Improve documentation.
Upgrade vulnerable dependencies.
Support client-side web app (CSP) workflow as long as web app path is in the /csp/* space (#147, #449)
Add compile-only commands 'Compile Current File' and 'Compile Current File with Specified Flags...' (#595)
Add 'Edit Other' command plus menu option below 'View Other' (#309)
Report server-side errors from imports and isfs saves (#391)
Use web app token when authenticating with Management Portal and Class Reference.
Permit empty argument list in 'Debug this' (#642)
Add objectscript.compileOnSave setting to turn off post-save compile (#594)
Treat system=1 parameter on non-%SYS isfs folder spec as signal to include %-items (#623)
Add objectscript.multilineMethodArgs setting to use UDL parameter supported on servers with API version 4+ (#457)
Add snippets for business processes.
Prevent leading space in front of Class keyword from blocking import (#613)
Import into the correct namespace when working with multi-root workspace (#535)
Refactor 'Jump to Line' to use DocumentSymbolProvider.
Improve 'View Other' when working with servers supporting API version 4+ (#363)
Support Language Server enhancement that opens local copy of file when using 'Go to Definition' in client-side editing mode.
Update connections when settings are changed (#608)
Improve documentation.
Upgrade vulnerable dependencies.
Avoid prompting for already-saved password (#61)
Constrain QuickOpen list contents when isfs folder path targets a specific package (#581)
Show isfs folder label in breadcrumb even without proposed APIs enabled (#599)
Improve information about compiler flags (#532)
Add clickable links to compilation error text in Output pane (#386)
Relabel Variables folders in debugger to be Private and Public instead of Local and Global (#482)
Fix debugging breakpoint command message when class has multiple packages (#597)
Support expansion of orefs in debugger Variables pane provided server-side API version implements the necessary support (#598)
Improve README.
Upgrade vulnerable dependencies.
Note: The best way to install and use this extension is by installing the InterSystems ObjectScript Extension Pack and following the documentation here.
InterSystems® ObjectScript language support for Visual Studio Code, from the InterSystems Developer Community.
Documentation on GitHub Pages.
Guidance on reporting issues.
- Debugging ObjectScript code.
- Intellisense support for commands, system functions, and class members.
- Export of existing server sources into a working folder:
- open Command Palette (F1 or ⌘/Ctrl+Shift+P)
- start typing 'ObjectScript'
- choose ObjectScript: Export Code from Server
- press Enter
- Save and compile a class:
- press ⌘/Ctrl+F7
- or, select ObjectScript: Import and Compile Current File from Command Palette
- Direct access to edit or view server code in the VS Code Explorer via isfs and isfs-readonly FileSystemProviders (e.g. using a multi-root workspace). Server-side source control is respected.
- Server Explorer view (ObjectScript: Explorer) with ability to export items to your working folder.
- Integration with with InterSystems Server Manager for secure storage of connection passwords.
Install Visual Studio Code first.
Then to get a set of extensions that collaborate to bring you a great ObjectScript development experience, install the InterSystems ObjectScript Extension Pack.
When you install an extension pack VS Code installs any of its members that you don't already have. Then if you ever need to switch off all of those extensions (for example, in a VS Code workspace on a non-ObjectScript project) simply disable the extension pack at the desired level. Member extensions can still be managed individually.
Open VS Code. Go to Extensions view (⌘/Ctrl+Shift+X), use the search string @id:intersystems-community.objectscript-pack and install it.
This extension is able to to take advantage of some VS Code APIs that have not yet been finalized.
The additional features (and the APIs used) are: - Server-side searching across files being accessed using isfs (TextSearchProvider) - Quick Open of isfs files (FileSearchProvider).
To unlock these features (optional):
Download and install a beta version from GitHub. This is necessary because Marketplace does not allow publication of extensions that use proposed APIs.
2.8.1, look for 2.8.2-beta.1. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.vscode-objectscript-2.8.2-beta.1.vsix) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code.From Command Palette choose Preferences: Configure Runtime Arguments.
json
"enable-proposed-api": ["intersystems-community.vscode-objectscript"]intersystems-community.vscode-objectscript version X.Y.Z-beta.1 activating with proposed APIs available.After a subsequent update of the extension from Marketplace you will only have to download and install the new vscode-objectscript-X.Y.Z-beta.1 VSIX. None of the other steps above are needed again.
To be able to use many features you first need to configure the connection to your IRIS/Caché/Ensemble server(s) in your VS Code settings. If you are unfamiliar with how settings work and how they are edited, use that link.
We recommend you define server connections in the intersystems.servers object whose structure is defined by the InterSystems Server Manager helper extension.
Install that extension and consult its documentation about its UI and commands for easy setup of connections, plus assistance when editing the JSON definition directly.
For more tips about the intersystems.servers object, see the Notes section below.
A simple workspace -- a local working folder in which you edit InterSystems source files and manage them using client-side source control (e.g. Git) -- will use the objectscript.conn settings object to import locally-edited code into a namespace on a server, compile it there and run/debug it, and also for initial export of an existing codebase (optional). This settings object is usually defined in Workspace Settings, for example in the .vscode/settings.json file of your working folder.
A quick way to add objectscript.conn to a new working folder is:
For more about objectscript.conn see the Notes section below.
To edit code directly in one or more namespaces on one or more servers (local or remote) we recommend creating a workspace definition file (for example XYZ.code-workspace) where you specify one or more root folders that directly access namespaces via the isfs or isfs-readonly URI schemes. The only difference between these two schemes is that any file opened from a folder using the isfs-readonly scheme will be set as read-only in VS Code and thus protected against being changed.
.code-workspace extension.For more about isfs and isfs-readonly folder specifications see the Notes section below.
Connection-related output appears in the 'Output' view while switched to the 'ObjectScript' channel using the drop-down menu on the view titlebar.
The /api/atelier/ web application used by this extension usually requires the authenticated user to have Use permission on the %Development resource (read more). One way is to assign the %Developer role to the user.
If you are getting ERROR # 5540: SQLCODE: -99 Message: User xxx is not privileged for the operation when you try to get or refresh lists of classes, routines or includes, then grant user xxx (or a SQL role they hold) Execute permission for the following SQL Procedure in the target namespace.
SQL
GRANT EXECUTE ON %Library.RoutineMgr_StudioOpenDialog TO xxx
intersystems.serversThis settings object is useful for both client-side and server-side development. - An example server definition named 'local':
json
"intersystems.servers": {
"local": {
"webServer": {
"scheme": "http",
"host": "127.0.0.1",
"port": 52773
},
"description": "My local IRIS",
"username": "me"
}
}
By defining connections in your User Settings they become available for use by any workspace you open in VS Code. Alternatively, define them in workspace-specific settings.
Setting the username property is optional. If omitted it will be prompted for when connecting, then cached for the session.
Setting a plaintext value for the password property is not recommended. Instead, install the InterSystems Server Manager extension and use that to store your password securely.
If no password has been set or stored it will be prompted for when connecting, then cached for the session.
objectscript.connThis settings object is primarily relevant when doing client-side development.
- We recommend that objectscript.conn uses its server property to point to an entry in intersystems.servers. For example:
json
"objectscript.conn": {
"active": true,
"server": "local",
"ns": "USER"
}
The mandatory ns property defines which server namespace you will work with.
When the server property is set, any username or password properties of objectscript.conn are ignored. Instead these values come from the intersystems.servers entry.
isfs and isfs-readonly workspace foldersServer-side development is best done using isfs folders. The read-only variant isfs-readonly is also useful when doing client-side development, since it enables server-side searching of your codebase.
To modify how your folder behaves, edit the JSON of your workspace definition (XYZ.code-workspace file). Get there by using the 'Edit Settings' option from the context menu of Server Manager's 'Servers' view, or by running the 'Preferences: Open Workspace Settings (JSON)' command from the Command Palette. Edit your uri property.
The csp query parameter indicates web application files are to be shown. The uri path optionally specifies which application. The namespace suffix on the server name (preferred syntax) or the ns query parameter (deprecated) must specify the same namespace the application is configured to use. In the following example the first folder is for the /csp/user web application in the USER namespace of the server named 'local' and the second gives read-only access to all web applications that reside in the %SYS namespace. The second folder also uses the optional name property:
json
{
"uri": "isfs://local:user/csp/user?csp"
},
{
"name": "local:%SYS web files (read-only)",
"uri": "isfs-readonly://local/?ns=%SYS&csp"
}
To see only classes in the Xxx.Yyy package, format the uri like this:
json
{
"uri": "isfs://local:user/Xxx/Yyy?type=cls"
}
type=cls to show only classes, or type=rtn to show only routines.flat=1 to flatten the hierarchy.generated=1 to show generated items.system=1 to show system (%) items. Without this parameter these are only shown for the %SYS namespace.filter=filterspec to use a filter specification formatted in the same way as used in InterSystems Studio's File Open dialog (e.g. filter=Ensem*.inc).CaretDev provides commercial support services. Request a quote.
On-line course from CaretDev - Developing with VS Code ObjectScript – Easy Start.
Enhancements
WorkspaceSymbolProvider (#772)Open Shell in Docker option to Server Actions menu (#778)Fixes
FileSystemProvider mtime caching (#770)Fixes
Enhancements
Fixes
/api/atelier web application is disabled or missing (#752)Require confirmation before compiling all code in namespace (#677)
Respect maxResults parameter when running server-side search (#713)
Handle multiple spaces between Class keyword and classname (#717)
Report license starvation connection error properly (#721)
Display AfterUserAction errors reported by server-side source control (#701)
Preserve user edit if it triggered a successful checkout in server-side source control (#703)
Fix failing Go to Definition from CSP file when working with isfs (#727)
Support 'Open Document' action by server-side source control (#731)
Upgrade vulnerable dependency.
Add Watchpoint support to debugging (#697)
Make QuickOpen respect any filter=xxx query parameter on the isfs folder definition (#593)
Fix unexpected alerts about server-side copy being newer when working with isfs (#683)
Always run isfs dialog's serverInfo request in the %SYS namespace (#682)
Fix "Cannot read property 'toLowerCase' of undefined" error on startup (#693)
Report problem if isfs workspace definition points to non-existent server definition (#695)
Give clearer messages if user has insufficient privilege on the server (#678)
Allow opting out of 'Other Studio Action' server-side source control calls (#691)
Allow extension to work in untrusted workspaces.
Don't switch to File Explorer view when opening a file from ObjectScript Explorer (#651)
Scroll to correct line after an Output panel link is clicked (#657)
Handle compilation errors better (#673)
Improve documentation.
Upgrade vulnerable dependencies.
Support client-side web app (CSP) workflow as long as web app path is in the /csp/* space (#147, #449)
Add compile-only commands 'Compile Current File' and 'Compile Current File with Specified Flags...' (#595)
Add 'Edit Other' command plus menu option below 'View Other' (#309)
Report server-side errors from imports and isfs saves (#391)
Use web app token when authenticating with Management Portal and Class Reference.
Permit empty argument list in 'Debug this' (#642)
Add objectscript.compileOnSave setting to turn off post-save compile (#594)
Treat system=1 parameter on non-%SYS isfs folder spec as signal to include %-items (#623)
Add objectscript.multilineMethodArgs setting to use UDL parameter supported on servers with API version 4+ (#457)
Add snippets for business processes.
Prevent leading space in front of Class keyword from blocking import (#613)
Import into the correct namespace when working with multi-root workspace (#535)
Refactor 'Jump to Line' to use DocumentSymbolProvider.
Improve 'View Other' when working with servers supporting API version 4+ (#363)
Support Language Server enhancement that opens local copy of file when using 'Go to Definition' in client-side editing mode.
Update connections when settings are changed (#608)
Improve documentation.
Upgrade vulnerable dependencies.
Avoid prompting for already-saved password (#61)
Constrain QuickOpen list contents when isfs folder path targets a specific package (#581)
Show isfs folder label in breadcrumb even without proposed APIs enabled (#599)
Improve information about compiler flags (#532)
Add clickable links to compilation error text in Output pane (#386)
Relabel Variables folders in debugger to be Private and Public instead of Local and Global (#482)
Fix debugging breakpoint command message when class has multiple packages (#597)
Support expansion of orefs in debugger Variables pane provided server-side API version implements the necessary support (#598)
Improve README.
Upgrade vulnerable dependencies.
objectscript.conn.server referencing non-existent intersystems.servers entry (#586)isfs://server:namespace/ syntax as an alternative to the ns=NAMESPACE query parameter (#450)First production release.
/_vscode webapp using the %SYS namespace.isfs://server/?ns=%SYS&csp gives access to all %SYS webapps from a single root folder.Add Server Namespace to Workspace... command and quickstart button to add webapp-type roots.objectscript.conn settings are available to it.Jump to Tag + Offset command for MACs and INTs, and make it available via click on statusbar field.--enable-proposed-api switch the QuickOpen field (Ctrl/Cmd+p) will now search connected servers for classes, routines etc.View Other.Add Server Namespace to Workspace... command and surface it on folder context menus in VS Code Explorer.Choose Server and Namespace button to VS Code Explorer view when no folder or workspace is open. This provides a quick way to get started with server-centric development, particularly when combined with the 'just-in-time' connection definition enhancement that arrived in version 0.0.7 of the Server Manager extension.intersystems.servers is used for the connection.Import and Compile Current File.export.addCategory setting:
intersystems.servers for its connection.
objectscript.conn.server defers to Server Manager.Studio Action "Changed Namespace" not supported message in output channel.objectscript.autoShowTerminal option controlling whether terminal shows automatically when connected to docker-compose. Default is false.intersystems.servers object for more flexible connection definitions.intersystems.servers definitions.isfs-readonly scheme to give readonly access to server code.objectscript.format.commandCase set to invalid value.View Another Namespace... command in ObjectScript Explorer only apply to the selected server.debug this method action.isfs:// used, now possible to execute some actions from Studio Source class menu$zobj<xxx> functions replacedisfs://"objectscript.conn.active": true to enable itobjectscript.autoPreviewXML)..Name, ..SomeMethod()https://github.com/daimor/vscode-objectscript/blob/master/CHANGELOG.md