View unanswered posts | View active topics



Reply to topic  [ 5 posts ] 
Autocompletion class suggestion priority 
Author Message
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Hi,

It would be useful if FD would suggest classes that have already been imported first in the autocompletion. Currently it seems to suggest anything and everything in alphabetical order which means you end up typing the whole classname, especially when you have class names with a prefix (a.b.MyPrefixSprite, a.b.MyPrefixShape etc.).

If only a.b.MyPrefixSprite is imported, typing var s:My... should suggest MyPrefixSprite first and not MyPrefixShape and MyPrefixSelect etc.

Regards,

Nx


Mon May 11, 2015 8:34 am
Profile
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Another remark: Class suggestion is currently ordered by package then Class name. Furthermore the search is performed with a "contains" and not a "beginsWith".

So in this example, var f:FacebookFriend = .... FD suggests 15 other classes containing "Facebook" all starting with a prefix (ex: MyPrefixFacebookItem, MyPrefixFacebookList etc.) and only finally suggests a.b.FacebookFriend when I type "FacebookF".

There should definitely be some kind of relevance score to prioritize classnames that start with what the user has typed. I get it's useful to find all the classes that contain a keyword (with prefixes as above) but in 99% of cases, you know what your classname starts with.

Regards,

Nx


Mon May 11, 2015 8:49 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Variants giving different filtering behaviours:
Code:
var f:facebook
var f:Facebook
var f:FF


Sun May 17, 2015 10:27 pm
Profile WWW
Member

Joined: Wed Feb 13, 2013 2:17 pm
Posts: 45
Reply with quote
Hi Philippe,

I don't get your answer.

If we have following classes in the project :

com.facebook.MyClass
a.b.MyFacebook
c.d.FacebookFriend
c.d.FacebookScore
e.f.TiffEncoder

Autocompletion should suggest classes in this order:

var f:Facebook => c.d.FacebookFriend (starts with first in alphabetical order), c.d.FacebookScore, a.b.MyFacebook (in class name second), com.facebook.MyClass (in package last)

var f:facebook => i'd expect same as above but could alternatively be package first since no capital letter

var f:FF => e.f.TiffEncoder

If however, we already have imported c.d.FacebookScore in the current file,

var f:facebook / var f:Facebook => c.d.FacebookScore, c.d.FacebookFriend (starts with first, imports first in alphabetical order, then other classes in alphabetical order), , a.b.MyFacebook (in class name second), com.facebook.MyClass (in package last)

Does this make sense?


Wed May 20, 2015 2:40 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Yes what you're asking makes sense and is a desirable improvement - but currently the list is completely unaware of the imports you already have.


Thu May 21, 2015 10:07 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.