New Releases: SRP Editor 3.2 and SRP Utilities 2.1.7
The SRP Editor adds code folding and the SRP Utilities gets a couple minor improvements.
SRP Editor 3.2
The SRP Editor now supports code folding. A lot of work was put into this feature to ensure accurate recognition of BASIC+ code blocks and SRP’s Extended BASIC+ blocks, such as Service…End Service. When you open your code, you’ll see folding markers along the left-hand side.
And when you collapse a fold, you’ll see ellipsis at the end of the line to make it clear that there are hidden lines.
The SRP Editor will fold standard multi-lined code blocks: If statements, Case blocks, Locate statements, Loops, and even block (/*…*/) comments. It will also fold the main program, GoSubs, Services, Events, etc.
The SRP Editor also supports #region…#endregion folding. This new syntax allows you to create custom folding regions so you can better organize your code. Moreover, these regions will appear in the Ctrl+L Label DropDown list so you can quickly navigate to them.
You can expand or collapse all folding points by right-clicking in the margin and selecting the desired action.
There is a caveat to this feature. In order to accurately identify folding points, the SRP Editor now has to fully parse your code when it is first opened. Previously, it only had to parse what was on the screen to colorize it, but you can’t create a folding point without analyzing where that fold will end. As a result, there is an increased delay in opening stored procedures, which is more noticeable when you open several large documents at once, such as during startup.
In fact, since starting up the SRP Editor is taking longer these days as we add new features, we’ve added a small splash screen so you know what’s happening.
If you feel that code folding just isn’t worth the performance cost, you can turn it off in the Options window.
The Options dialog also lets you limit how deep the folding goes. If you set Folding to “1 Deep”, then you will never have a fold within a fold. If you set it to “2 Deep”, then you will have folds with folds, but not folds within folds within folds. You get the idea.
You can download this release today and see how code folding can work for you.
SRP Utilities 2.1.7
The SRP Utilities got a small update today as well.
First, the SRP PreCompiler got an improvement. When you use Extended BASIC+ to create service or event modules, behind the scenes, the precompiler converts statements like GoToService into a bunch of standard BASIC+ statements that ultimate rely on On…GoSub. It came to our attention that On…GoSub is limited to 255 labels. Sadly, going over this limit does not produce a compiler error, so breaching that limit can lead to bugs which are difficult to isolate.
SRP Utilities 2.1.7 works around this limitation by using as many separate On…GoSub statements as needed, wrapping them in a Case statement. In short, just do what you’ve been doing and don’t worry about secret BASIC+ limits anymore.
This release also fixes an oversight in SRP_Json in which object keys were not getting properly escaped.
SRP Utilities 1.2.7 is available for download now. As always, the latest SRP Utilities is included in our SRP Editor installer, so if you install the SRP Editor, you’re all set.
Leave a Reply