Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor fromBrowser Tree - Mailing list pgadmin-hackers

From Dave Page
Subject Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor fromBrowser Tree
Date
Msg-id CA+OCxowrfff5pU-sKTpk8G4oDpxpYRSmJ-mZbrhWWTYPB7fubQ@mail.gmail.com
Whole thread Raw
In response to [pgAdmin][RM4139] Drag and drop object names in Query Editor fromBrowser Tree  (Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>)
Responses Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor fromBrowser Tree
List pgadmin-hackers
Hi

On Wed, Jun 26, 2019 at 2:24 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,

Attached is the patch to allow tree nodes to be dragged and dropped in query editor wherever you take the drop cursor. The drop text will be fully qualified and double quoted if required.
For functions/procedures it will drop the the label stripping away the parameter names, with empty pair of round brackets. It will also set the focus cursor inside the brackets if there were params otherwiser to the end of text.
For adding a node type, you need to register it in browser.js along with a callback function which will return drop text along with cursor positioning and selection. Currently, I have registered for "table partition type sequence package view mview foreign_table edbvar schema column edbfunc function edbproc procedure".

Please note, the drag design customisation is not supported in IE.

I think for functions/procedures, we should include placeholders for the parameters, so the user has a hint about what they need to fill in to complete the call.

Also; shouldn't there be a doc update?

Thanks.
 
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [GSoC][Patch] Automatic Mode Detection V1
Next
From: Aditya Toshniwal
Date:
Subject: Re: [pgAdmin][RM4139] Drag and drop object names in Query Editor fromBrowser Tree