Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] what would be the best area to filter the doubles out of the completion engine?

i am looking at it so what i did was quickly put it by display name in a map
But to my surprise this didnt work because for a override method proposal the name is padded with some empty spaces..
So i guess thats there for a reason but why?
see _javascript_CompletionProposalLabelProvider
you have there 2 kind of methods.. almost exactly the same except:

nameBuffer.append(")  "); //$NON-NLS-1$

So why is that?

On Mon, Apr 21, 2008 at 11:16 AM, Andrei Sobolev <andrei.sobolev@xxxxxxxxx> wrote:
Hi Johan,

For Tcl I have same problem in some cases.
I've filter duplicates in completion engine itself, because more
information are available at completion time.

For _javascript_ case I suppose using of filterAndSortProposals() method
is a good decision.

Best regards,
Andrei Sobolev.
> In _javascript_ i constantly see double method names in the code completion
> This is because i get 1 as a Method Declaration and another as a
> Method Reference.
> Both have the same name in the end but the are in the internal sets
> and lists as 2 different kind of things.
> The ScriptCompletionProcessor:
>     protected List filterAndSortProposals(List proposals,
>             IProgressMonitor monitor, ContentAssistInvocationContext
> context) {
>
> ProposalSorterRegistry.getDefault().getCurrentSorter().sortProposals(
>                 context, proposals);
>         return proposals;
>     }
>
> would be a good place i think to first filter for doubles?
>
> johan
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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


Back to the top