Toad World® Forums

Code folding on Toad 12.7

Hi all,

i have a toad 12.7 base edition and i’m not able to find any way to customize the code folding option.

All the suggestion i’ve found goes to VIEW->Toad Option->Editor -> Behavior and then reference to Language Management that i haven’t.

Is there any way?

Bye

Just looking at my Xpert edition,

I see the Folding options in the Editor->Behavior page of the Options.

Thanks Gary,

yes i have it but that don’t give you the possibility to personalize the folding option (i.e. when and where place the plus/minus).

Bye

The edit control has been replaced and it is no longer possible to define custom lexing/folding rules. The old control allowed for heavy lexer customization through regular expressions. It was very flexible; however, it was too complex for many users and poor performing with larger documents. It is costly to lex code using regular expressions. The new control has hard coded rules in place for lexing and folding. It is missing some of the folding ranges from earlier versions, but the common ones are implemented and others can be introduced in time.

Thanks,

Michael

Sorry if I’ve missed it in the documentation, but is there any text / explanation of the “hard coded rules” logic used for code folding in the new edit control ?

Thanks in advance for any consideration.

Open/close parenthesis pairs, begin…end, loop…end, if/elsif/when (folds on “then” token), else, case, multi-line comments, multiple single-line comments on consecutive lines. Pretty much all logical blocks are covered. Entire statements like SELECT and what not are no longer folded. That would probably be the main difference compared to the prior versions.

Michael

On 09/01/2015 04:03 PM, MichaelA wrote:

RE: Code folding on Toad 12.7

Reply by MichaelA
Sorry if I’ve missed it in the documentation, but is there any text / explanation of the “hard coded rules” logic used for code folding in the new edit control ?

Thanks in advance for any consideration.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

The WITH clause isn’t covered.

Also, would you consider adding a formatting option to specify the color of the line when above the 1st line of folded code.

It was really nice in the older version to read through folded code without visual distractions.

Thanks,

12.6 and earlier was very configurable. All folding and styling ranges were identified using regular expressions. It was very flexible, but performance was a problem with large text. Development on that control had ceased some years back. The new edit control is good for the masses, but lacks some of the folding configurations. It’s much better at handling large text. The new one has been in use for a couple of years now and I don’t recall the WITH example coming up before so I won’t try and alter the control to support it. Ideally I’d like to stay away from trying to merge all old functionality of the old into the new so that we can move forward with an up to date control.

The folding lines have only 5 options. Show nothing, show above folded text, show below folded text, show above expanded text, show below expanded text. Toad is using the show line before folded text setting. All of the “show line” settings use the Default font color.

Our company just upgraded to 12.8. I think the old one was 12.3.or 4. I see what you are saying, its a trade off. I could live with the first CTE collapsing the entire statement, but the black lines really do make a mess of things. Maybe expose the ‘show line’ settings to the user?

It’s too late for this cycle to expose anything, but I can look at it for next. Keep in mind your 5 choices though. Show line before or after folded range, show line before or after unfolded range, and don’t show line. So really you only have 2 options regarding the line, show it or don’t show it. If shown it’s just a matter or where it is drawn. In all cases when the line is shown it will be shown in your default font color as you see it now, only its position will change.

That’s fine. Personally, I’d be happy to just hide it. Thanks for the consideration.