Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351120

Summary: include "pretty name" in person content assist
Product: z_Archived Reporter: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Component: MylynAssignee: Thomas Ehrnhoefer <thomas.ehrnhoefer>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: steffen.pingel
Version: unspecifiedKeywords: contributed, noteworthy, plan
Target Milestone: 3.7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch v1
steffen.pingel: iplog+
mylyn/context/zip
none
screenshot none

Description Thomas Ehrnhoefer CLA 2011-07-04 16:39:29 EDT
Currently PersonProposalProvider only uses the identifier part in the content proposal. That means that if my id is "tehrnhoefer" but my pretty name "Thomas E", typing "thomas" wont include me in the list.
I would assume most users would expect it to show up though.
Also, repositories not having a user readable ID (e.g. an integer) will currently have a pretty useless "type & filter" functionality
Comment 1 Thomas Ehrnhoefer CLA 2011-07-04 17:51:51 EDT
Created attachment 199078 [details]
patch v1

A first go on this. Will need to verify it fixes the behaviour in my connector, but it should.
It will simply apply the filter text to the proposals a connector can provide (ID/prettyname pairs), and add the ID to the set if a match is found.
A bit ugly due to the read-only set that .subset is returning, but I think creating a new TreeSet should not interfere anywhere.
Comment 2 Thomas Ehrnhoefer CLA 2011-07-04 17:51:53 EDT
Created attachment 199079 [details]
mylyn/context/zip
Comment 3 Thomas Ehrnhoefer CLA 2011-07-04 18:07:15 EDT
I just verified that this works for my connector (and should do so for every connector supplying an ID/prettyName pair).
Comment 4 Steffen Pingel CLA 2011-07-15 21:59:49 EDT
Thank for the great patch, Thomas! I have applied it to master and also made this work for Bugzilla. Additionally, I tweaked the matching strategy slightly to be case insensitive and to match any word of the pretty name.
Comment 5 Steffen Pingel CLA 2011-07-20 08:07:34 EDT
Created attachment 199981 [details]
screenshot