Color Highlighting style for JOINS

Does anyone know if there is a color syntax highlighting style specifically for JOINS? Or if not, would I be able to create a custom style?

In other words, I currently have joins highlight in blue because that’s how I have the “Reserved word” style is set up. But ideally I would like JOINs and probably ONs with a separate color from the rest of reserved words. Is that possible?

What version of Toad? Version 12.6 and earlier this is possible. 12.7 and later it's not.

On 08/14/2015 01:31 PM, dorianpc wrote:

Color Highlighting style for JOINS

Thread created by dorianpc
Does anyone know if there is a color syntax highlighting style specifically for JOINS? Or if not, would I be able to create a custom style?

In other words, I currently have joins highlight in blue because that's how I have the "Reserved word" style is set up. But ideally I would like JOINs and probably ONs with a separate color from the rest of reserved words. Is that possible?

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.

Version 11.6

Here's an example I whipped up to show those words in lime green.

  1. In Options on the Editor, Behavior tab click the "..." button in the Languages groupbox to edit the PL/SQL lexer.

  2. On the Highlighting tab click Add to create a new style. Give it a name and set the Font attributes as you want. I chose lime.

  3. On the Rules tab click Add to add a new lexer rule. Give it a name and set the Rule Type to "Tag detector" on the Properties tab to the right.

  4. Set the Style to the newly created style you made in step #2.

  5. On the Conditions click the "+" and check Identifier as the Token type to look for.

  6. Uncheck "Include all tokens" and add JOIN and ON, one per line.

  7. Select the Keywords style, conditions tab and remove JOIN and ON from that parser rule. Click OK and OK again on the options window. JOIN and ON will now be highlighted differently than other keywords. As you add new words to your new parser rule be sure to remove them from the Keywords list.

Michael

On 08/14/2015 02:22 PM, dorianpc wrote:

RE: Color Highlighting style for JOINS

Reply by dorianpc
Version 11.6

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.

That's awesome.That should work perfect for me. Any clue why it wouldn't work in a newer version of Toad? I was planning to upgrade soon but this small detail is worth not upgrading for now. Thanks for the example.

On Fri, Aug 14, 2015, 2:36 PM Michael Staszewski bounce-mstaszew@toadworld.com wrote:

RE: Color Highlighting style for JOINS

Reply by Michael Staszewski

Here's an example I whipped up to show those words in lime green.

  1. In Options on the Editor, Behavior tab click the "..." button in the Languages groupbox to edit the PL/SQL lexer.

  2. On the Highlighting tab click Add to create a new style. Give it a name and set the Font attributes as you want. I chose lime.

  3. On the Rules tab click Add to add a new lexer rule. Give it a name and set the Rule Type to "Tag detector" on the Properties tab to the right.

  4. Set the Style to the newly created style you made in step #2.

  5. On the Conditions click the "+" and check Identifier as the Token type to look for.

  6. Uncheck "Include all tokens" and add JOIN and ON, one per line.

  7. Select the Keywords style, conditions tab and remove JOIN and ON from that parser rule. Click OK and OK again on the options window. JOIN and ON will now be highlighted differently than other keywords. As you add new words to your new parser rule be sure to remove them from the Keywords list.

Michael

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.