Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Where is the code that filters the completion proposals?

Thanks Alex,

I have dug deeper starting from your example and my functionality can
be controlled also through:
ScriptMethodCompletionProposal.computeTriggerCharacters() which I can override.

Thanks!


On Tue, Oct 6, 2009 at 5:48 AM, Alex Panchenko <alex@xxxxxxxxx> wrote:
> Hi Gabriel,
>
> The filtering happens in
> org.eclipse.jface.text.contentassist.CompletionProposalPopup class:
>
>     private final Runnable fFilterRunnable= new Runnable() {
>         public void run() {
> ....
>                     proposals= computeFilteredProposals(offset, event);
> ....
>             if (proposals != null && proposals.length > 0)
>                 setProposals(proposals, fIsFilteredSubset);
>             else
>                 hide();
>         }
>     };
>
> So, the nature way to terminate completion is when there are no proposals
> found.
>
> And the control keys (arrows, esc, enter, tab, etc) are handled in
> CompletionProposalPopup.verifyKey(VerifyEvent)
>
> Regards,
> Alex
>
> ----- Original Message -----
> From: "Gabriel Petrovay" <gabipetrovay@xxxxxxxxx>
> To: "dltk-dev" <dltk-dev@xxxxxxxxxxx>
> Sent: Tuesday, October 6, 2009 12:05:38 AM GMT +06:00 Almaty, Novosibirsk
> Subject: [Dltk-dev] Where is the code that filters the completion proposals?
>
> Hi,
>
> Can you please give me a hint where the filtering of completion proposals is
> performed after the completion pop-up is displayed. More precisely, after
> the pop-up is shown, if the user pressed more keys, the results in the
> pop-up are filtered. In my case, '-' is part of the identifier, and when the
> user types '-' (as part of the name), the completion is interrupted
> (probably because a default word detector is used instead of mine). How can
> I change this behavior?
>
> Thanks for the help!
>
> Regards,
> Gabriel
>
> --
> MSc Gabriel Petrovay
> Mobile: +41(0)787978034
> www.28msec.com
>
> _______________________________________________ dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/dltk-dev
> _______________________________________________
> dltk-dev mailing list
> dltk-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>
>



-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com


Back to the top