Go Back
5 Votes

Make Synergy statements collapsible


Delivered

Making certain traditional Synergy statements collapsible (ala C#) in the IDE would be tremendously helpful in maintaining code:
BEGIN-END
USING-ENDUSING and CASE-ENDCASE
RECORD-ENDRECORD and COMMON-ENDCOMMON (including implied ENDRECORD/ENDCOMMON)

are good places to start. Eventually, it would be nice to also collapse loops (FOR, DO, WHILE, etc.) and any other related section of code.

Paragraphs/internal subroutines may be a bit more challenging as there can be multiple entry points and RETURNs which could be difficult to determine what is the entirety of the paragraph, but collapsing paragraphs would also be nice.

7 Comments | Posted by Kish Baley to Synergy DBL, Synergy .NET, Visual Studio Integration on 4/10/2019 3:49 PM
Marty Lewis

We call this bit of functionality Outlining.

I think expanding it to support all the different syntax blocks is a great idea. You've got my vote!

I'm not sure how we would be able to detect your blocks for internal subroutines, but you could always use .region/.endregion to wrap your internal routines and get neatly collapsible regions. If we implement begin/end, you could ensure that you use begin/end blocks to get more or less the same behavior.

User-added image


4/10/2019 4:04 PM   0  
Ace Olszowka
See also https://synergexresourcecenter.force.com/SiteIdea?id=08732000000CxgOAAS

Which is a similar ask from back in 2016

4/11/2019 10:22 PM   0  
Gordon Ireland
Maybe one  way to provide this for internal subroutines would be to wrap the internal subroutine in a begin end ?

eg,
calc,
       begin
       a += 1
       b += 1
       c = a + b
      return
       end
      


 

4/12/2019 8:28 AM   0  
Steve Ives
We have documented this in our internal feature planning system and intend to implement it soon.

9/17/2020 3:42 PM   0  
Steve Ives
This has now been worked on and will be included in an upcoming SDI release.

12/1/2020 7:46 PM   0  
Gordon Ireland
Thank you

If this allows collapsing and expanding nested BEGIN/END blocks it will be very useful.

eg

repeat
begin
     if (test) then
     begin
          if (anothertest) then
          begin
               brilliant lines of code
           end
          else
           begin
               slightly less impressive lines of code
           end
    end
     else
           begin
               more code 

           end


end

maybe anothe end I mightn't really need ?


 

12/1/2020 7:50 PM   0  
Steve Ives

Indeed it will.

User-added image

In fact in that scenario you will have aa choice whether to collapse the REPEAT statement:

User-added image

Or the BEGIN/END block:

User-added image

Or, both!

12/1/2020 8:17 PM   0  
Please log in to comment on this idea.