Page 1 of 1

IDE - Make Auto-Complete Context-Sensitive

Posted: Mon Apr 20, 2015 3:05 pm
by c4s
This request is inspired by Shield's well received suggestion over here: Please make the auto-complete list context-sensitive!

For example when you're on the flags parameter in OpenWindow(), the editor should just show the allowed window flags or at least put them on top. Maybe the most recently and/or frequently used ones should also be displayed first. Furthermore it could be handy to exclude certain topics (per project?), e.g. everything exclusively related to the 3D library etc.

To clarify: I'm talking about reordering the suggested items in the auto-complete list in a more intelligent way -- potentially not only for flags but everything everywhere like Content Assist in Eclipse or IntelliSense in Visual Studio.


Edit: Added a little more explanation.

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Mon Apr 20, 2015 11:09 pm
by Dude
c4s wrote:For example when you're on the flags parameter in OpenWindow(), the editor should just show the allowed window flags or at least put them on top.
I disagree. I use custom flags for many things, including for window flags, so excluding my custom flags just because the text to the left of the cursor is OpenWindow(), is plain annoying. I should be able to autocomplete anything at any time, not just where the cursor is sitting.

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Tue Apr 21, 2015 12:24 am
by Thunder93
Working on OpenWindow flags parameter, It should only show up the associated flags that can be used. Excluding all the other #PB_* parameters that has no relations. This is something I never understood or agree with about PB. As it stands currently I have to jump way down to the near end of this list just to find the associated OpenWindow flag(s).

+1 for c4s feature request.

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Tue Apr 21, 2015 9:53 am
by c4s
@Dude
I think you're misunderstanding my request because I've never mentioned that custom items should be excluded. I'm talking about reordering the suggested items in the auto-complete list in a more intelligent way. Every serious IDE I know of (e.g. Content Assist in Eclipse or IntelliSense in Visual Studio) is already doing that as it obviously reduces errors and improves typing speed.
If you're against it then you've probably never used something like that before so you don't know the advantages (which is of course totally fine). I respect your opinion but dismissing such an important feature just because you got used to your own workflow isn't necessarily a useful advice for the PureBasic team.

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Tue Apr 21, 2015 1:07 pm
by TI-994A
c4s wrote:...the editor should just show the allowed window flags or at least put them on top. ... it could be handy to exclude certain topics (per project?), e.g. everything exclusively related to the 3D library etc.
Relevant ordering in the auto-complete menu is a great idea; and so is library-based exclusions.

However, these settings should be user-selectable based on preference. :wink:

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Tue Apr 21, 2015 1:35 pm
by Josh
The problem is, you are speaking here only for PB native commands. This should also work with customer commands. A way for this, I posted 5 years ago:

http://www.forums.purebasic.com/english ... =3&t=42480

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Wed Apr 22, 2015 11:29 am
by Dude
TI-994A wrote:these settings should be user-selectable based on preference. :wink:
+1 for sure. Just because the current command is OpenWindow, doesn't mean I want to autocomplete any window flags right there.

Re: IDE - Make Auto-Complete Context-Sensitive

Posted: Wed Apr 22, 2015 11:41 pm
by oreopa
+1severaltrillion