Bug 351120 - include "pretty name" in person content assist
Summary: include "pretty name" in person content assist
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.7   Edit
Assignee: Thomas Ehrnhoefer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy, plan
Depends on:
Blocks:
 
Reported: 2011-07-04 16:39 EDT by Thomas Ehrnhoefer CLA
Modified: 2012-03-21 10:57 EDT (History)
1 user (show)

See Also:


Attachments
patch v1 (5.42 KB, patch)
2011-07-04 17:51 EDT, Thomas Ehrnhoefer CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (29.03 KB, application/octet-stream)
2011-07-04 17:51 EDT, Thomas Ehrnhoefer CLA
no flags Details
screenshot (8.08 KB, image/png)
2011-07-20 08:07 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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