[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?
|
- From: Gabriel Petrovay <gabipetrovay@xxxxxxxxx>
- Date: Tue, 6 Oct 2009 15:15:12 +0200
- Delivered-to: dltk-dev@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=KeogXEeWS0ZvnJP36A3VQ0tnbKBHYk53XLppnvkyLHk=; b=YHqymyIge8fJEowUTxYBD8weQye+UFhMZ4sKwrJgotekekemrQIjUNRptSUloA0w+9 DLTz2XqDO8m3nH8cCmHJ7oiXDxA/PwKQZFWa0PVBZGEZLBsvvJE5kJlRsglbp4v7TUwi PkFZqWiJmTX+DnYtemioGmzoJdoNo2i8pmzus=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=kAZOZ8g1yBFQZuW4A4r43NufHhkYYxE1ODIgoootpkHO+5mxRBqJqWbqJdhWV/MieK fC+vwmCzxwkHJjoxxh80sg+jJo/Gj9L0AhFOVA7xv/jF8IqaGfTSE20kaBtD6anbD3Fx IwFCjuc4QobrTzhpx8hl0ThYi95s+7iuP7khM=
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