[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ide-dev] Auto content assist

On PyDev the auto-assist is turned on by default (with the current structure).

It mostly does what Daniel said, adding all characters to the auto activation, but after trying to use that on JDT, I didn't find it really fluid to use. My issues were:

1. Highly tune completions for speed (if it's slow to compute, it becomes annoying to use -- async can help, but it has to be tested, it may end up being annoying to use anyways).
2. Don't apply the completion on '.' (rather, put a dot at that point and request a new completion -- maybe there's a way to do this, but I didn't really search much due to point 1.)

As a note, on PyDev, all completions are required to implement ICompletionProposalExtension (so, after a first invocation it's mostly filtering -- I had to do some workarounds related to sorting to resort whenever a new char is entered in this case, as the PyDev sorting takes into account many things such as if it starts with the exact qualifier, which changes as the user keeps typing as the completion engine can match some completions by substrings), but this means that even if PyDev slows down a bit sometimes to compute the initial set of completions -- which should be rare -- it'll stay fast afterwards (I think this is probably required for any plugin that wants to provide auto-assist on any char).

The only downside is that users need to know that <Shift+Enter> should be used to enter a new line as <Enter> will apply the current completion -- that's the first tip I always give to users:Âhttp://www.pydev.org/manual_101_tips.html ;)

Best Regards,

Fabio


On Fri, Apr 21, 2017 at 7:25 AM, Mickael Istria <mistria@xxxxxxxxxx> wrote:
On 04/21/2017 10:19 AM, Daniel Megert wrote:
There are bugs regarding this topic. General one and a JDT specific one. In JDT you can actually enable this by entering all characters as auto activation triggers. Not sure CDT offers that too.
This is a workaround, but the result is suboptimal because the cursor isn't placed in the proper location after a completion for continuous completion in some cases, and the fact that content-assist is synchronous in JDT make the IDE quite laggy.

Overall, auto-content assist depends on having content assist asynchronous, or at least not blocking the UI Thread, as it's doing currently for most editors.
--
Mickael Istria
Eclipse developer for Red Hat Developers
My blog - My Tweets

_______________________________________________
ide-dev mailing list
ide-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ide-dev