Toad World® Forums

Folding procedures in a package

I’m using Toad For Oracle 12.

Folding is working on the words Begin, If-then-else, …

but how can I fold a whole procedure or function in a package?

Can i add ‘function’ and ‘procedure’ as keywords in a congifuration-file so there will appear a ±sign?

Thx,

Dirk

You can sprinkle /*startfold */ and /*endfold */ comments anywhere in your code for ultimate flexibility. See snapshot for an example.

Folding.png

Yes, I can

but I don’t want to insert these tags everywhere in all my packages.

Some years ago, I think I inserted somewhere the (key)words ‘procedure’ and ‘function’ in a table? or a config-file? or setup …

and then a plus-sign was visible before every procedure-block in all my packages.

Some years ago, I think I inserted somewhere the (key)words ‘procedure’ and ‘function’ in a table? or a config-file?

Yes, years ago you could customize the regular expressions to support the procedure/function folding region you seek, but this is no longer possible. The editing control used now is different and does not rely on regular expressions for its lexing.

Michael

Ah, OK, I thought I was hallucinating …

Thx for the quick responses.

Are there any known bugs in this feature? I use this extensively in 13.1.0.78, and have many occurrences where the fold is too greedy and folds past the end, and/or sometimes to the end of the package...

Please submit some folded/unfolded examples so our Dev team can take a look... if folding is too greedy, then I would consider this a bug, and our Dev and Support teams need to track.

Thanks - is there an e-mail address I can submit the code too? I don't wish the example to be public.

Let me forward this thread to our Dev team, and get direction for you. We used to keep Support@Quest.com open for these types of communication, but I'm not sure that inbox is being attended regularly now.

@shenan.hawkins I sent you a direct message. Check there.

Thanks everyone. My issue turned out to be an inner "CASE WHEN" together on one line, between the fold delimiters. I wasn't aware of that issue, so my issue is a dupe.