Search and open procedures or tables with the context menu

17 views
Skip to first unread message

Matthias Melzner

unread,
Nov 15, 2021, 10:00:56 AM11/15/21
to SQL Workbench/J - DBMS independent SQL tool
Hello,

I noticed that it is laborious to search a procedure or table from the SQL source code.
So I implemented two actions accessible from the context menu which search and open the wanted procedure or table.

Screenshot 2021-11-15 155659.png

You can either mark the text (as shown in the picture) or simply click at it and search for it with F8 and F9 or via the context menu.

Screenshot 2021-11-15 152946.png

Depending on which mehtode is called  the program will open the Objects or Procedures panel and then search and open the wanted procedure/table. If it doesnt find a matching result it will return to the panel you started on.


A issue which I couldn't resolve is that you need to load the Objects and Procedures panels in advance by selecting both once. Otherwise you get the following error message if you try to search for a table from the procedure panel without selecting the Objects panel once before.

Screenshot 2021-11-15 153504.png

The other way round it simply gives theis popup message and after trying to search for it a second time it will work.
Screenshot 2021-11-15 153854.png


I believe that this feature is quite handy and makes searching for different procedures or tables easier. I would like to hear your opinion about it.
You can find the patch file with all my changes in the attachements. 


Regards 
Matthias
SearchAndOpenContextMenu.patch

Thomas Kellerer

unread,
Nov 17, 2021, 3:40:35 PM11/17/21
to sql-wo...@googlegroups.com
Hello,

nice idea, indeed.

I never use the DbExplorer to edit procedures and from within a regular editor panel this is easily reachable through "Object Info" and "Find in object tree", so I never thought of adding it to the DbExplorer.

I'll see if I can iron out the problems.

I will however remove the keyboard shortcuts, as it's nearly impossible to add new ones without the risk of colliding with some existing configuration.

Regards
Thomas


Matthias Melzner schrieb am 15.11.2021 um 16:00:
> Hello,
>
> I noticed that it is laborious to search a procedure or table from the SQL source code.
> So I implemented two actions accessible from the context menu which search and open the wanted procedure or table.
>
> Screenshot 2021-11-15 155659.png
>
> You can either mark the text (as shown in the picture) or simply click at it and search for it with F8 and F9 or via the context menu.
>
> Screenshot 2021-11-15 152946.png
>
> Depending on which mehtode is called  the program will open the Objects or Procedures panel and then search and open the wanted procedure/table. If it doesnt find a matching result it will return to the panel you started on.
>
>
> A issue which I couldn't resolve is that you need to load the Objects and Procedures panels in advance by selecting both once. Otherwise you get the following error message if you try to search for a table from the procedure panel without selecting the Objects panel once before.
>
> Screenshot 2021-11-15 153504.png
>
> The other way round it simply gives theis popup message and after trying to search for it a second time it will work.
> Screenshot 2021-11-15 153854.png
>
>
> I believe that this feature is quite handy and makes searching for different procedures or tables easier. I would like to hear your opinion about it.
> You can find the patch file with all my changes in the attachements.
>
>
> Regards
> Matthias
>
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sql-workbenc...@googlegroups.com <mailto:sql-workbenc...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sql-workbench/ce286815-f3ed-4257-a08e-b47e13305bdan%40googlegroups.com <https://groups.google.com/d/msgid/sql-workbench/ce286815-f3ed-4257-a08e-b47e13305bdan%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages