AutoCompletion upgrade?

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

AutoCompletion upgrade?

Postby john.allen » Fri Jun 08, 2012 3:23 am

This is something I mentioned to a number of you at Servoy World, namely to take full advantage of the JSDoc ability to extend autocompletion much further it would be great if the autocompletion itself would actually auto complete on what one has already typed! For example say you want to do an 'application.getValueList...' function. You will type 'appl' normally and then application will be the only item left so you can just hit the return. Then you type 'getVa' and you'll get a selection like in the picture below. But the remaining items are all the same through 'getValueList' so you either type all those additional letters before typing A,D,I or N to get your selection or you bang on the arrow key until you have what you want.
1application.getValueList.png
application.getValueList...
1application.getValueList.png (42.34 KiB) Viewed 7827 times

Now with JSDoc and autocompletion extended to JSRecords, etc. you can also have all kinds of places where it is even less convenient. The example below here shows relationships from one table 'course'. Here everything is the same all the way from 'cou' to 'course_'. Add a 't' and everything is the same for all of the 'course' table relations. Banging on the down arrow key on the other hand is a big pain and makes autocompletion almost worthless in those situations.
2DatabaseRelations.png
Relations
2DatabaseRelations.png (32.74 KiB) Viewed 7827 times

If one could just hit the 'tab' key at that point then one would immediately have all of the 'course' relationships right at your fingertips. This is the way auto completion works with many, many applications these days (not to mention file completion names in UNIX or even - I understand from Johan - in DOS!).

Here for example is AquaDataStudio, another Java application... I have three tables in my schema of 100 odd tables that all start with 'F'. But those three tables are then all the same through 'FOLLOWUP_'. But in ADS I just hit 'f', then the tab key (see below) and either I, S or T and I have my table selected having hit three keys in all.
4FollowUpEnd.png
4FollowUpEnd.png (14.31 KiB) Viewed 7827 times

A number of you also seemed to like this idea so I've posted it in the JIRA system. Please give it a vote. My experience of it with Aqua Data Studio is that it makes a very big difference and in the Servoy environment with all the other places that autocompletion plays a role I'm sure it will have an even bigger impact. Here's the link:
https://support.servoy.com/browse/SVY-2392
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: AutoCompletion upgrade?

Postby ptalbot » Fri Jun 08, 2012 5:04 am

You can also use the mouse to scroll and select the value you want, just saying.
But I see what you mean, and possibly that could be helped by putting on top of the list all the values break down by the '_' character.

So in your example, typing 'cou' would give you:
- course_
- course_to_
then the rest of your list.

And you would type 'cou', followed by two down arrow keys, followed by c, d, l, p, r, s or v and get to your selection quicker.

But how about the values that are not using '_' as a separator? Like camelCase names widely used in JavaScript object properties for example?
Should this also break down the selection based on Upper case letters?

I'm just wondering how that could be implemented...
The fact is that the current behavior is the Eclipse default behavior - you get that in JDT for Java as well.
So I'm not sure how much effort this would require to change that default behavior. Probably a lot.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1659
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: AutoCompletion upgrade?

Postby john.allen » Fri Jun 08, 2012 9:41 am

You can also use the mouse to scroll and select the value you want, just saying.

Not the point. Of course there are work arounds but that takes your hands off the keyboard and slows you down.

There is a general 'protocol' used in autocompletion: it should be case-insensitive (so camelcase doesn't matter), treat underscores like letters (so complete through them thus go all the way through to 'course_to_') but not other punctuation. To trigger the autocompletion it is either the tab key (most applications) or, in iOS and other handhelds with limited keyboards, the space bar. If there is only one match most applications (including Servoy/Eclipse) will automatically just enter the whole phrase.

I understand that what we have might be the default behavior of Eclipse. I think Johan was saying the same thing at Servoy World. That doesn't make it right; that is simply the wrong, counterintuitive behavior. As mentioned Aqua Data Studio is also a Java application and does auto completion perfectly. And by 'perfectly' I mean it simply 'auto completes'! So it should be possible. And I repeat if we ever get it, you'll find it really does make a big difference.
John Allen
Stanford University
john.allen
 
Posts: 515
Joined: Wed Jul 02, 2003 10:07 pm
Location: Stanford CA USA

Re: AutoCompletion upgrade?

Postby ROCLASI » Fri Jun 08, 2012 10:28 am

It does make sense that the auto-complete would complete up until the point where you would have more than one option.
So tabbing would complete up until it finds more than one option in that namespace. Hitting return will select the highlighted option in the popuplist.

Voted +1.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron