SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[11.2.246 Pro] - Issues with popups and history

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[11.2.246 Pro] - Issues with popups and history
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post [11.2.246 Pro] - Issues with popups and history Reply with quote
There are a couple of ways adding minor snippets of code to the editor not limited to Snippets themselves. One of those ways is the Keywords in formatting. SA has some factory defaults for those in the Preferred keywords, many of them help adding windowing functions but there are some others as well. I added quite few of my own to that section and it worked quite well in versions prior 11.2. After upgrading to 11.2 I've run into several problems.


Check this short video here.



In the screenshot above you can see some of those preferred keyword-driven shortcuts for entering SELECT statements. One of those is SELECT TOP 5 * FROM. Now, that cannot be easily added because it is located at the 9th position, so after typing SE I'd have to press the down arrow 8 times or use the mouse to get there, both of which are a bit slower that trying to type the whole statement instead. So I thought why not narrow it down by filtering further and I added L to the already typed SE.

And then came the surprise. As I've cleanly reinstalled SA so that my existing settings would not interfere with any possibly incompatible changes, DB Options / SQL Intellisense Items / History Items was still enabled. I've disabled that years ago for the same reason this post and ranting was born but now I'm trying to make use of that feature. But back to the issue...

After typing L a list of history items is replacing the stuff in the popup with a bunch of old queries with random measure of uselessness (is that even a word?):




Now, it's great to have some history after typing something like this:



and I really miss this feature but that intrusion after typing the third letter was so annoying that I decided to live without it just to get rid of that infuriating invader.

Alas, they seem to go sort of hand in hand, so if I want the bad kind of history to get lost, the good one goes with it, because the only way (I've found) to make the bad guy vanish is unchecking DB Options / SQL Intellisense Items / History Items. An only sort of, because I can kill the good guy and leave the bad one intact by setting DB Options / History / History Items Shown in Lists to 0. Which, by the way, seem to only work as a "suggestion", because it initially shows that many items but I can resize the popup so that it shows more than the preset number. Though I cannot scroll them otherwise, that's true.



Is there another way around that keeps the nice history and smashes the ugly one in the face with a shovel, please? Also, is there another way to get to the history items other than using the mouse or scrolling all the way down the bottom of the item list? That list might consider a vast number of items. Perhaps making the popup list wrap around so pressing the Up arrow at the top of the list would make it jump to the bottom/last item could work.
Tue Jul 21, 2020 6:24 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
I think some of that behavior evolved over the years. If you start from scratch, you will see a different result.

But first here is how the upgrade process works. In every maintenance version we add some new features and settings as well as we make changes in the existing settings for which we need to overwrite the existing values. If you install upgrade for an existing maintenance version, we continue using the existing configuration file, all your settings are the same as before. Otherwise we make a copy of the previous setting file and then merge what can be merged from it with the new version file. the settings in the new version have a precedence. We updated the settings and scope for items that can show up in Database Explorer and separately in SQL Intellisense prompt, they are separate now, and that is the reason for we couldn't preserve your settings for the History items, they kind of moved to a different place internally.

Please check if the Keywords section still has the Preferred keywords section where you expect them and how you expect them, and there is no merge conflict that ruined your keyword ordering. More keywords have been added in 11.2 to support newer database versions.

The history section is filled with two kinds of items, with the fragments of code you typed in the editor, and with the text of queries you executed recently whether you typed them, pasted or just opened fro ma file. By default that section in Intellisense shows 4 items after the first 2 characters entered when the keyword prompt is set to show up (it can be still scrolled or resized). If you resize it manually, the 4 items no longer applied to it. the 8 is for the last 8 executed statements (in case you erased them opened new tab, and you want them back, perhaps to change slightly and run again. Since the keyword is after 2, when you type in 3 characters, keywords disappear, and you can see only the matching history items, showing as many as fits into the popup, that is by design, the 4 items rule doesn't apply in that case.
Tue Jul 21, 2020 6:02 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
I understand all of that, and it's not what I have problem with. I'll try to explain.

There are two kinds of histories. Three, actually, but the one that's recorded upon executing code doesn't play here. #2, the one that is more helpful, is the one that pops up after different keywords are entered. I like that one, and I'd like to keep using it. And #1, which is rather pesky than of any significant use, is the one that pops up after hitting the 3rd key and immediately discards the popup list of the keywords.

There are two problems with that:

A. Obviously, it interferes with keyword popup.
B. I can disable #2 and have #1 working, but in a real life scenario, #2 would be used quite frequently while #1 would only be seeing sunshine every other leay year. I'd frequently re-use small parts of code but it's very rare to need exactly the same statement again. Alas, I found no way to disable #1 while keeping #2.
Wed Aug 05, 2020 10:18 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
I agree. It really sucks that one cannot be used without the other. This could be a good enhancement. I will try to push for that addition implemented in the next maint.release.

I did experiment a bit with the settings too, and I get best results when I choose "Most frequently used" option instead of "Most recently used", and set the SQL history items to a fairly large number like 100. There are some queries that I apparently use repeatedly, found out with the help of the settings while playing with them, and that makes them appear at the top of the list. The results may vary of course based on the usage. Your case might be very different from my testing results.


Last edited by SysOp on Thu Aug 06, 2020 3:15 am; edited 1 time in total
Thu Aug 06, 2020 1:23 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post Reply with quote
Thanks. I'll also try to play a little with the settings too. Might even work for me as well.
Thu Aug 06, 2020 3:05 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.