go to post Brett Saviano · Sep 4 @Mohamed Oukani VS Code documentation has been moved to docs.intersystems.com. Here's the link to the "Migrate from Studio" page: https://docs.intersystems.com/components/csp/docbook/DocBook.UI.Page.cls...
go to post Brett Saviano · Aug 26 Hi @Gramen Tontchev, for non-classes and routines on the local file system the main extension needs to use the file name to determine the name of the document on the server. There's no guarantee that all "other" document types will have the name of the document stored in the text, and even if that were true, it would be very difficult for the extension to know how to extract that info from each one. I have a PR open that will improve the client-side editing workflow, but this behavior remains the same. TL;DR: The name of the file must match the name of the document on the server.
go to post Brett Saviano · Aug 20 @David Hockenbroch This functionality exists in VS Code. It's provided by the Language Server extension. Here's the description of the feature from that extension's README: To invoke the command, right-click in a blank line of a class definition body and select the Override Class Members row in the menu that appears. The command will insert the selected class member definition(s) at the cursor position where the command was invoked.
go to post Brett Saviano · Aug 15 VS Code does as well. The Language Server extension provides a formatter that does this, among other features.
go to post Brett Saviano · Aug 15 @Igor Barboza You can use %Library.SyntaxColor to parse ObjectScript. Here's some code to get you started: ClassMethod WriteAllCommands() { Set syn = ##class(%SyntaxColor).%New(), in = ##class(%Stream.TmpCharacter).%New(), out = ##class(%Stream.TmpCharacter).%New() #; TODO Put your document's contents into "in" Do syn.Color(in,out,"COS" /* or "INT" or "CLS" */,"K" /* means JSON output */) #; Format of the JSON output: #; [ #; #; One array for each source line #; [ #; { #; #; Language of the token. See Languages() in %Library.SyntaxColor. #; "l": %Integer, #; #; Attribute of the token. See Attributes() in %Library.SyntaxColor. #; "s": %Integer, #; #; Zero-indexed start position of the token on the line #; "p": %Integer, #; #; Length of the token in characters #; "c": %Integer #; } #; ] #; ] Set json = ##class(%DynamicArray).%FromJSON(out), lineIter = json.%GetIterator() While lineIter.%GetNext(.lineNum,.lineTokens) { Set tokensIter = lineTokens.%GetIterator() While tokensIter.%GetNext(,.token) { If ( #; COS (token.l = 1) && ( #; Command (token.s = 32) || #; User-defined Z command (token.s = 52) ) ) { Write "Command starting in column ",token.p + 1," of line ",lineNum + 1,! } } } }
go to post Brett Saviano · Aug 2 @Marykutty George There are two ways you could do this: Create a multi-root VS Code workspace with a folder for each namespace and use the search UI to search all folders. Write a method that calls the %SYS.Namespace List query to list all namespaces, then enter each one and call ##class(%Studio.Project).FindInFiles().
go to post Brett Saviano · Jul 31 @David Marinkovic VS Code uses REST to connect to IRIS. If you're using a version without the private web server, you need to configure an external web server. This is needed for the management portal as well. Since you're on Windows, your installer probably configured IIS to serve web applications for IRIS. Documentation can be found here.
go to post Brett Saviano · Jul 18 @Stefan Cronje You can open the classes in VS Code and and it will notify you when you use deprecated classes or methods. There isn't a programmatic way to get that information (for example, by calling a ClassMethod) but it would be possible to write one using %SyntaxColor.
go to post Brett Saviano · Jul 15 @Jason Jones Our main VS Code extension provides a UI for debugging a REST service. It will prompt for data to create a REST request, makes the request, and attaches the debugger to the IRIS process that handles the request so you can step through the code like any other method.
go to post Brett Saviano · Jun 27 @Kwabena Ayim-Aboagye No, there hasn't. Even if we had formatting for your specific example, the extra newlines would be erased when the document gets saved on the server. The only code in class definitions that's preserved as-is is implementation code enclosed in curly braces. The rest is stored in a global and regenerated from the global after a save.
go to post Brett Saviano · Jun 25 @Yone Moreno Jimenez Did you try $ZSTRIP with the following arguments? Set string = $ZSTRIP(string,"<>",$CHAR(13,10)) $ZSTRIP without a mask code in the second argument and with specific characters as the third argument will strip just those specific characters.
go to post Brett Saviano · Jun 24 @David Cui I can confirm that IRIS versions 2023.1.5, 2024.1.1 and 2024.2 will support this feature. It has not been released in the 2024.2 preview stream yet though, which is why the GitHub Pull Request that implements the VS Code-side work hasn't been merged.
go to post Brett Saviano · Jun 24 @Mario Sanchez Macias Please see this page in our documentation for how to use a self-signed certificate.
go to post Brett Saviano · Jun 24 @Alin Soare You can't prevent that. The actual text of the class isn't stored in the database. During a save, it gets converted to a global that gets stored in the database, and then converted back into text. The class's text is always regenerated in "canonical" form, with excess spaces removed, capitalization normalized etc. This process doesn't affect method/query implementation code though, it's purely cosmetic.
go to post Brett Saviano · Jun 20 I'm not familiar with all of the Zen specific methods in that class. For working with JSON outside the Zen framework though (for example, in REST APIs), new code should use Dynamic Objects.
go to post Brett Saviano · Jun 20 @Alin Soare What "auto-formatting" are you referring to? Can you provide before and after screenshots showing what gets changed on save?
go to post Brett Saviano · Jun 20 @Evgeniy Potapov You can use Dynamic Objects for working with JSON data
go to post Brett Saviano · May 15 @Lukas Dolezal VS Code's View Other command supports jumping to the same line in the INT routine, but that support requires an InterSystems server with Atelier API version 4 or above (Cache 2018.1.6+, IRIS 2019.1.2+, 2020.1.1+, 2021.1+). If you're not using one of those versions then the location mapping won't work.
go to post Brett Saviano · May 9 An important detail about the independent Studio is that it is installed in its own directory, so it won't be uninstalled when you upgrade/add/remove IRIS instances on your system. Also, since the 2024.1 Studio is forward-compatible, you won't need to update it every time a new IRIS version is released.
go to post Brett Saviano · Apr 18 There is an open feature request for automatic indentation support, but that doesn't include adding newlines: https://github.com/intersystems/language-server/issues/293