Written by

Senior Sales Engineer at InterSystems
Question Marcel den Ouden · Sep 5, 2023

VSCode interop

When we add a new class in VSCode, the name automatically is set to <Folder>.<Filename>.

Because we are doing interoperability, we remove the default and type "interop" to get assistance on creating the class. This works fine on some machines, however on others it generates:

/// DescriptionClass C:\InterSystems\Training\src\Test.MyProd Extends Ens.Production
{ ...

So it uses the full pathname instead of Test.MyProd.

I guess it is a setting somewhere (settings.json?), but how can this be fixed/what is the setting that controls this? I have compared the settings on both machines but don't see a difference so far.

Thanks, Marcel

Product version: IRIS 2023.1
$ZV: latest

Comments

Brett Saviano · Sep 5, 2023

@Marcel den Ouden 
The VS Code extension uses your objectscript.export settings to determine what the name of the file should be from its URI. It assumes that if you're working in a client-side folder you will have those settings properly configured for how your classes are stored in the local folder (since they are needed to export classes). I don't know how the full path could be used for the file name so that is probably a bug.

0
Marcel den Ouden  Sep 5, 2023 to Brett Saviano
Class ${2:${TM_DIRECTORY/^.+\\/(.*)$/$1/}.$TM_FILENAME_BASE} Extends Ens.Production

Found this in GIT. It evaluates correctly to Test.MyProd on my Mac but to the full filename in the Windows client next to me. Could this be a "backslash \" vs "forward slash /" issue ? My regex knowledge is insufficient here...

0