Question
· Nov 29, 2023

How can we set the properties of a package in VSCode?

In the wew versions of IRIS the Studio is going to be deprecated. In the Studio when editing classes there is an option to add information at package level, with the option "Package Information" that shows this dialog:
 

 

In VSCode there is the option to add/edit this package information? If no, how can one add/edit this information without the Studio?

Thanks.

$ZV: IRIS for UNIX (Ubuntu Server 22.04 LTS for x86-64) 2023.3 (Build 254U) Wed Nov 8 2023 12:59:54 EST [Health:7.0.3]
Discussion (8)4
Log in or sign up to continue

Very interesting question! In case anyone is wondering, in Studio you can access this info in the Workspace View on the Namespace tab or the Project tab. Right-click on the package name, and click Package Information. The information entered here is stored in the ^oddPKG global, subscripted by package name.


There doesn't appear to be a way to access this information in VS Code. I think it's worth creating an issue for this here (VS Code ObjectScript issues) and see what happens.

Maybe is not a very used feature but in our team we think also that is a quite handy feature.

As @Dmitry Maslennikov wrote, we are using it mostly to shorten long multi-level package names, but it is also useful for grouping classes that do different tasks (e.g. classes with tables and others with stored procedures) from different packages into a single SQL package.

 

You can set it programmatically:

set package = ##class(%PackageDefinition).%OpenId("User",,.sc)
 
zw package
package=2@%Library.PackageDefinition  ; <OREF>
+----------------- general information ---------------
|      oref value: 2
|      class name: %Library.PackageDefinition
|           %%OID: $lb("User","%Library.PackageDefinition")
| reference count: 2
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|         ClientName = ""
|        Description = ""
|       GlobalPrefix = ""
|               Name = "User"
|          OwnerName = ""
|          RtnPrefix = ""
|            SQLName = ""
+----------------- swizzled references ---------------
|             i%list = ""  <Set>
|             r%list = ""  <Set>
+-----------------------------------------------------