Code Beautifier in CLOB view

We frequently use CLOBs to hold executable code. When I go to look at it, I click on the CLOB field and the window pops us. What I have to do then is select all, go to an editor window and hit the beautifier button to read the code. I would like to suggest a code formatter button on the CLOB window for myself and probably others who need it. If it is not code of course you wouldn't be hitting the code formatter but if you did the formatter will go off the rails but maybe there is a protection for that. Anyway, just a suggestion.

The default shortcut for formatting is CTRL+Shift+F.

That works in the CLOB popup.

I'm wondering if this request isn't for different formatting rules... e.g. one set of rules for (PL/)SQL and scripts (which Toad has already), and another set for other language formatting/beautification.

I see customers putting a lot of JSON, XML content in CLOBs, but what are the languages you embed in your CLOBs, Lawrence? Java? C/C#/C++? Perl? etc.

Ah yes. That does work with the ctrl/shift/f . Thanks for the tip! (Reminds me of the old WordPerfect days! :smile: )
Thanks for the info!

Yes, we use JSON and XML in our CLOBs as well. I didn't think of that. The software engineers probably care more about that. I was just thinking SQL.

But with the ctrl/shif/f it always comes up and says "you can't edit clobs" or something like that and I have to click through. I normally just want it formatted to review. I have developed a script to allow me to reinsert it if it needs to change. That dialog is quite annoying.

Hi Lawrence,

Toad can edit clobs, so I'm not sure why you are getting that dialog. (Maybe a read-only dataset?)

CTRL+Shift+F is working here if I've selected ROWID in my select statement.

If you can provide some detailed steps to reproduce the problem, I'll try to figure out what's happening.


I have seen it a hundred times now I can't reproduce it. Sorry. Mark this one as user confusion.

There may be a bug there that happens only in certain situations.

Next time you get the error message, post a screen shot and let me know your Toad and Oracle versions and I'll try to get to the bottom of it.

Finally got it to give me that message about not being able to modify a read only dataset repeatably.

Ah, ok. I can reproduce that. I'll take a look at it.