Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partial code completion resp. auto complete inconsistent #30

Open
pstueck opened this issue Mar 21, 2024 · 6 comments
Open

partial code completion resp. auto complete inconsistent #30

pstueck opened this issue Mar 21, 2024 · 6 comments

Comments

@pstueck
Copy link

pstueck commented Mar 21, 2024

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 🤔).

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.

  • table names (assume actual table list is hungry, hello_there and hello_all)
    • 😃 he is extended to hello_ upon pressing Ctrl-Space
      and it does not matter, if there is a leading select * from, a schema name or nothing—it just works
  • column names (assume actual column list is byebye, greetings and greatness)
    • 😞 g (without leading alias) is deleted upon pressing Ctrl-Space (although the list shows both entries starting with g)
      expected behavior (like in 20231211_2128): g is extended to gre upon pressing Ctrl-Space
    • 😄 x.g (with leading alias) is extended to x.gre upon pressing Ctrl-Space
@gerdwagner
Copy link
Member

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:

  • Use the latest snapshot version.
  • Check your Code Completion configurations at menu File --> New Session Properties --> tab Code Completion
  • In case you are using a database specific Plugin you may try to disable it.

@pstueck
Copy link
Author

pstueck commented May 16, 2024

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

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 … 😕 but 😄 and also 😟

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 😜) 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
Copy link
Member

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
Copy link
Author

pstueck commented May 22, 2024

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
Copy link
Member

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
Copy link
Author

pstueck commented May 28, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants