Skip to content

I20220310-1800

@testforstephen testforstephen tagged this 09 Mar 20:32
This commit allows the CompletionEngine to skip the specified
types before it creates the type completion proposals. The
CompletionRequestor subclass is able to override the method
'isIgnored(char[] fullTypeName)' to apply its own type filters.

The benefit of checking the ignored types in CompletionEngine
is that it can avoid creating unnecessary CompletionProposals.
For some CompletionProposal, it takes up a lot of computation
time when creating the relevance property.

For example, when the constructor CompletionProposal computes
relevance, it will resolve TypeBinding for each proposed type
and use TypeBinding to check the compatibility. Resolving
a large number of TypeBindings in completion can slow down
completion speed a lot.

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Change-Id: I9df12db5084533c2b2be3fde7c5519bb5869a96b
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/191039
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
Assets 2
Loading