squirrel-sql-client / squirrel-sql-code

Share of the SQuirreL SQL source code originating from SourceForge, see https://squirrelsql.org
GNU Lesser General Public License v2.1
59 stars 11 forks source link

partial code completion resp. auto complete inconsistent #30

Open pstueck opened 3 months ago

pstueck commented 3 months ago

Version 4.7.1 OS: Ubuntu 22.04 (fix level Mar 21, 2024, no Ubuntu Pro)

Partial auto/code completion works inconsistent (or … I messed with some setting :thinking:).

Entities/table names are always extended based on the entries in the list. Attributes/column names are only extended based on the entries in the list, when aliased.

gerdwagner commented 2 months ago

Sorry, I can't reproduce your problem. I creates the following table create table githubissue30Test ( byebye VARCHAR(200), greetings VARCHAR(200), greatness VARCHAR(200) ) using PostgreSQL 14.4 and open Java 11.0.10+9 on Suse Linux. g without alias or table name was never deleted neither with or without table name or alias.

Here are some things you may try:

pstueck commented 2 months ago

Thanks!
Looks like something’s gone south in my configuration :sob:

With the ~previous legacy old ancient historic~ pre-historic configuration (I think, the original dates back to some SQuirreL 2.x), the problem still occurs.

So … I started the snapshot with an empty userdir, added the Oracle thin driver and the connection, and lo-and-behold … column completion works as expected.
Started 4.7.1 with the same, fresh userdir (only the connection from the snapshot there) … and it also worked … :confused: but :smile: and also :worried:

Which leads to the question: how do I find the configuration entry that causes all the problems?
And not to have to throw away my (over the years most carefulliest curated :stuck_out_tongue_winking_eye:) config and start anew?
Refreshing the object cache with my standard configuration did not change anything.

And … I missed that before, sorry … when the partial column completion fails, the output pane says “Completion list truncated. …”.

BTW: did I get that right that drivers are configured within the application directory (also)?
I was rather surprised to find all configured drivers still configured, when I started 4.7.1 with the fresh userdir.

gerdwagner commented 2 months ago

On finding configurations: SQuirreL offers to search for any string used somewhere in configurations and to jump to it. See menu File --> Find preference.

On "when the partial column completion fails": Sorry I don't know what you mean by "partial column completion". The "Completion list truncated... " message is issued when the completion list would need to display so many entries it wouldn't work right anymore, i.e. start lagging.

pstueck commented 1 month ago

On finding configurations: SQuirreL offers to search for any string used somewhere in configurations and to jump to it. See menu File --> Find preference.

If I only knew, which configuration entry causes the problem.
Have there been changes to configuration items from 4.5.1 to 4.7.1, as this feature does work in 4.5.1 with my existing configuration files (just verified), whereas 4.7.1 only correctly handles this feature with a blank resp. quite fresh configuration directory? Info: whenever I subsequently mention “4.5.1”, this also includes “4.7.1 resp. 202405014 snapshot with a blank resp. quite fresh configuration directory”.

On "when the partial column completion fails": Sorry I don't know what you mean by "partial column completion".

Is “incremental completion” more helpful?
This feature works with all sorts of objects and is not column specific … just the bug is.

I’ll try to explain again …
Expected behavior: when you enter an N, press Ctrl+Space and the completion list only has N-entries that all start with NoWhere, then not only this opens the completion list but a second Ctrl+Space also replaces N with NoWhere.
So we don’t need to have to type oWhere, as there are only entries that match that.
Actually happening: the completion list opens but the N is not replaced with NoWhere.
A second Ctrl+Space deletes the N and the completion list shows all entries.

The "Completion list truncated... " message is issued when the completion list would need to display so many entries it wouldn't work right anymore, i.e. start lagging.

That’s something that 4.5.1 does not show in the output pane, when I use that feature with that version.

Maybe some screenshots can help also … in 4.7.1 … image image

in 4.5.1 … first image is same as above
image

gerdwagner commented 1 month ago

Have there been changes to configuration items from 4.5.1 to 4.7.1

All changes since the 4.5.1 release can be found in our change log, see https://github.com/squirrel-sql-client/squirrel-sql-code/blob/master/sql12/core/doc/changes.txt In the change log look for the string "4.5.1 (11/13/2022)". All log entries above are changes after the 4.5.1 release.

Is “incremental completion” more helpful? ...

Sorry, I followed your steps but still couldn't reproduce your problem. I.e. hitting ctrl+space a second time never removes any edits.

pstueck commented 1 month ago

Is “incremental completion” more helpful?

Sorry, I followed your steps but still couldn't reproduce your problem. I.e. hitting ctrl+space a second time never removes any edits.

I know, also does not happen with a blank slate on my side. Will look into it, yet I was hoping you might have some suggestions for which preferences/whatever entries to look for (I really really would like to keep my actual—wellst maintainst—configuration).