Are there any workarounds to more easily do block commenting?

I know there has been an Idea Pond entry added for this, but until or if that's worked, is there any workaround to more easily and quickly block comment /* */ a section of code versus line comment style --?

Another extraction product I use (while developing the SQL in TOAD for it) fails on line comments pasted into it.

I saw a couple workarounds for "TOAD" to do this on other forums. One example was using a "search and replace macro". Apparently that is not available in Data Point, possibly it was a Toad for Oracle feature only, but it wasn't clear. Thanks.

Welcome to the TDP forum!

There are a couple of ways to accomlish block-commenting using /* ... */.
Perhaps the easiest is to create a "surrounds with" code snippet that adds the starting "/*" and ending "*/" to the text you've highlighted in the Editor. See the short vid below, where I highlight a few lines of code and then double-click my snippet to get my code commented.

CodeSnippetsToStarCommentBlocks

Another possible method is to create a new Application Code template that simply adds the comment character strings around whatever region is highlighted in the Editor. Simply visit
Tools->Options
on the main menu bar to open up the Toad Options base. Find the Application Code page under the Editor node, and create a new "language template", per snap below, where I've defined a Language Template called "BlockComment".

Then, you block-comment any highlighted region of code in the Editor by touching
Editor->Add Application Code
off the main menu bar.

The advantage of this second method is that...

  1. You also have the Remove Application Code automatically defined (to UNblock your comments), and
  2. Both the Add and Remove App Code functions can be invoked using keyboard shortcut keys that you define.

Hope this helps until TDP gets the enhancement request in.

Thanks for the reply and ideas to try.

I have tried the 2nd option Application Code. Here are the screenshots to be sure I did it right

I don't really understand how this is working. When I use the Editor>Add Application Code. It is by default utilizing the "BlockComment" code. I have several other codes that were default included by TOAD. I am surprised there isn't a popup that asks which code to apply. But that isn't a specific problem just a misuderstanding.

It does remove some of the convenience of this option because I get this popup, and to actually apply the code changes to the screen, I have to (paste) ctrl+V afterward.

I couldn't add a screenshot here. It says "Code Conversion: Converted Code has been copied to the Clipboard"

Finally when I choose Editor>Remove Application Code, TOAD does nothing. I have tried highlighting the whole section including comments, just the SQL, and just having the cursor inside the commented section, but still nothing at all happens to the code on the screen, and no popup, and trying a paste to see if it went to the clipboard does nothing. Can you think of why that might happen to me?

I have tried assigning shortcuts, and I get the same results as above. But testing this I didn't want to add the complication of assigning shortcuts in case of collisions. I was doing the tests above from the application menus. Thanks.

Yes, TDP allows for different App Code templates to be applied, to support the most common (external) languages that the user may be employing (e.g. Perl, VB, Java, etc.) So, yes, you'll need to choose the language template appropriate for your project.

And correct, when you Add Application Code to a highlighted section of your code---and also when removing the app code from a highlighted section that conforms to the defined template---the re-formulated code gets created in the ClipBoard, so you'll need to press Ctl-V to paste the re-formed code in the location of your Editor cursor.

Having said that, there appears to be a bug when removing the code, at least for my suggested definition of "CommentBlock" template. Raising awareness to Quest Software's Dev team to take a look at this.