Toad World® Forums

Editor not highlighting column names correctly when specified table_name.col_name

Hi,

I have my highlighting set to display known user tables in an olive colour. However, I’ve noticed that when I refer to a table column as “existing_table.column_name”, in 12.6, the “existing_table” is displayed in olive, and the “.column_name” is displayed in black. In 12.7.0.49, they’re both displayed as olive:

toad_incorrect_highlighting.jpeg

I think the 12.6 behaviour is the desired one - please can it be corrected in 12.7? Thanks.

For now there’s no way to change the new behavior. I’ll look at it when I have time, but the new and the old editor components handle things very differently so there are going to be some differences. If the list of table names is sent as-is then “test1” would
highlight OK when standalone, but as soon as you tack a column name to it then “test1.col” will not highlight. The object names are sent so that they highlight when standalone or when typed as object_name.anything. There are many cases of highlighting that
could be more accurate if you start looking for them, but in some cases the extra work required to do so isn’t worth it. In your test1.not_a_col example Toad would have to query for column names of your table to intelligently exclude that string from the list.
That could be very costly.

Michael

On 03/05/2015 08:26 AM, Boneist wrote:

Editor not highlighting column names correctly when specified table_name.col_name

Thread created by Boneist
Hi,

I have my highlighting set to display known user tables in an olive colour. However, I’ve noticed that when I refer to a table column as “existing_table.column_name”, in 12.6, the “existing_table” is displayed in olive, and the “.column_name” is displayed
in black. In 12.7.0.49, they’re both displayed as olive:

I think the 12.6 behaviour is the desired one - please can it be corrected in 12.7? Thanks.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

The behaviour in 12.6 is the same regardless of whether the column exists in the table or not. Is it really too difficult to stop the highlighting once the full stop is encountered? That’s what 12.6 seems to do, anyway (tested for both tables and packages).

Is it really too difficult to stop the highlighting once the full stop is encountered?

Yes. On the surface it seems easy, but what happens under the hood is at the core of the lexer which affects all syntax highlighting. Modifying the core lexer code to satisfy this one case will cause problems for many others. I’ll look at it later in the cycle.

On 03/05/2015 10:07 AM, Boneist wrote:

RE: Editor not highlighting column names correctly when specified table_name.col_name

Reply by Boneist
The behaviour in 12.6 is the same regardless of whether the column exists in the table or not. Is it really too difficult to stop the highlighting once the full stop is encountered? That’s what 12.6 seems to do, anyway (tested for both tables and packages).

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

Okie dokie; I know it’s a minor issue, but it looks really, really odd given that we’ve had the old behaviour for so long! Thanks for adding it to the list for when you’ve got time, though.