Written by

Question Mark OReilly · Jan 11, 2023

How to quickly open class in VS Code

Is there an easy way to open classes in VS Code?

In studio you go open and just type the class name and it opens up the class. 

In VS Code need to know the full path, is there a quick way? It is probably the one thing preventing from using VSCode full time (apart from not seeing the .luts or csp files)

Product version: IRIS 2022.1

Comments

Dmitry Maslennikov · Jan 11, 2023

VSCode has such feature, from Menu Go -> Go to file, (cmd+P/ctrl+P)

0
Raj Singh  Jan 11, 2023 to Dmitry Maslennikov

Even quicker way to get there is CMD-E twice (on Mac) or CTRL-E twice (Windows)

0
Marc Mundt  Jan 12, 2023 to Raj Singh

It would be great to have a cheat-sheet for all of these keyboard shortcuts and other tricks, especially in terms of "if you used to do X in Studio, here's how to do that in VS Code".

A few months ago I happened across the incantation for the VS Code equivalent of Studio's "Find in Files" (free text search of server-side classes) but forgot the key combination and haven't had the time to try to figure out which docs to check and guess at whether it's a standard feature of VS Code or of the ObjectScript plug-in.

0
John Murray  Jan 13, 2023 to Marc Mundt

For VS Code's native Search facility to search the server-side code your ISFS workspace gives you access to you must follow the instructions in the "Enable Proposed APIs" section of the extension's README (which is also available here). One of the steps will have to be repeated each time your InterSystems ObjectScript extension gets upgraded from MarketPlace with a new version.

0
Ben Spead  Feb 10, 2023 to Raj Singh

@Raj Singh  Thank you!!  

Curious - why wasn't this a D.C. article?  Is it because the location on github.io allow multiple people to collaborate on the content?

0
John Murray · Jan 11, 2023

Mark, if you are using the server-side editing paradigm, which matches what you're used to with Studio, make sure you follow the instructions in the "Enable Proposed APIs" section of the extension's README (also available here). Until you have done this the Ctrl/Cmd+P technique mentioned by Dmitry won't find anything when you are working server-side.

0
Evgeny Shvarov · Feb 17, 2023

Also added a request to open routine upon the error message. At the line of error.

0
Evgeny Shvarov  Feb 17, 2023 to John Murray

Thanks, @John Murray !
Tried - doesn't work for me:

for <UNDEFINED>zOnPhase+79^%ZPM.PackageManager.Developer.Processor.Default.Document.1

it shows:

f

0