Bug 187127 - support content assist to work after a comma in the cc list
Summary: support content assist to work after a comma in the cc list
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.0   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, noteworthy
Depends on:
Blocks:
 
Reported: 2007-05-15 17:11 EDT by Shawn Minto CLA
Modified: 2008-04-08 19:33 EDT (History)
3 users (show)

See Also:


Attachments
Patch (3.85 KB, patch)
2008-03-12 18:14 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (2.27 KB, application/octet-stream)
2008-03-12 18:14 EDT, Frank Becker CLA
no flags Details
updated Patch (7.12 KB, patch)
2008-03-13 17:47 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (5.12 KB, application/octet-stream)
2008-03-13 17:47 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (5.56 KB, application/octet-stream)
2008-03-13 17:59 EDT, Frank Becker CLA
no flags Details
updated patch (8.46 KB, patch)
2008-03-28 02:27 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (7.36 KB, application/octet-stream)
2008-03-28 02:27 EDT, Steffen Pingel CLA
no flags Details
follow (1.22 KB, text/plain)
2008-03-28 18:29 EDT, Frank Becker CLA
no flags Details
followup patch (1.22 KB, patch)
2008-03-28 18:36 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (8.64 KB, application/octet-stream)
2008-03-28 18:36 EDT, Frank Becker CLA
no flags Details
Enhancement (4.97 KB, patch)
2008-03-29 18:51 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (20.34 KB, application/octet-stream)
2008-03-29 18:51 EDT, Frank Becker CLA
no flags Details
update (4.63 KB, patch)
2008-03-29 18:56 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (20.39 KB, application/octet-stream)
2008-03-29 18:56 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Minto CLA 2007-05-15 17:11:24 EDT
Since multiple cc's can be added at a single time by comma separating them, it would be nice to be able to use content assist to add more than 1 user to this list.
Comment 1 Robert Elves CLA 2008-03-12 16:08:45 EDT
Frank, you've been doing excellent work on content assist of late.  Would you consider taking this on as well? 
Comment 2 Frank Becker CLA 2008-03-12 16:12:29 EDT
 (In reply to comment #1)
> Frank, you've been doing excellent work on content assist of late.  Would you
> consider taking this on as well?

OK, I try to do this.
Comment 3 Frank Becker CLA 2008-03-12 18:14:27 EDT
Created attachment 92375 [details]
Patch

I also include some jUnit tests
Comment 4 Frank Becker CLA 2008-03-12 18:14:28 EDT
Created attachment 92376 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2008-03-12 21:46:26 EDT
Thanks Frank. If I try to enter multiple email addresses using content assist only the last entered email address is kept. Could you look into that and add a test case for it?

Also it would be nice if the completion worked when there is a space after the comma or if only space is used as a separator, e.g. "email1, ema..." or "email1 email2".
Comment 6 Frank Becker CLA 2008-03-13 08:20:52 EDT
 (In reply to comment #5)
> Thanks Frank. If I try to enter multiple email addresses using content assist
> only the last entered email address is kept. Could you look into that and add a
> test case for it?

Steffen, only the one address where the cursor is located is used.

Sorry I was under the impression that you enter the first address and use the content assist before you want the content assist for an other address.

Actually I can not look at the code (I'am at work) if what you want is possible to implement. Will do this when I'am at home.

> 
> Also it would be nice if the completion worked when there is a space after the
> comma or if only space is used as a separator, e.g. "email1, ema..." or "email1
> email2".

I test if space is a valid list separator. If so, I will implement this.
Comment 7 Steffen Pingel CLA 2008-03-13 13:58:26 EDT
What I tried is that I entered "email1,ema" and then used content assist. The result was that only email2 remained in the text field and email1 was gone.
Comment 8 Frank Becker CLA 2008-03-13 17:47:24 EDT
Created attachment 92521 [details]
updated Patch

Now it is possible to use comma and space as separator.

The Error from Comment#7 is also fixed.
Comment 9 Frank Becker CLA 2008-03-13 17:47:26 EDT
Created attachment 92522 [details]
mylyn/context/zip
Comment 10 Frank Becker CLA 2008-03-13 17:59:01 EDT
 (In reply to comment #5)
> Thanks Frank. If I try to enter multiple email addresses using content assist
> only the last entered email address is kept. Could you look into that and add a
> test case for it?

Maybe we could try to overwrite ContentProposalPopup.createDialogArea() to start a new content assist if we find one more in the content.

Thoughts?
Comment 11 Frank Becker CLA 2008-03-13 17:59:17 EDT
Created attachment 92524 [details]
mylyn/context/zip
Comment 12 Steffen Pingel CLA 2008-03-28 02:27:32 EDT
Created attachment 93935 [details]
updated patch
Comment 13 Steffen Pingel CLA 2008-03-28 02:27:36 EDT
Created attachment 93936 [details]
mylyn/context/zip
Comment 14 Steffen Pingel CLA 2008-03-28 02:30:44 EDT
Thanks Frank! I have committed the updated patch which is based on your implementation. Please take a look if the changes I made address comment 10. 
Comment 15 Frank Becker CLA 2008-03-28 18:29:52 EDT
Created attachment 94077 [details]
follow
Comment 16 Frank Becker CLA 2008-03-28 18:36:02 EDT
Created attachment 94078 [details]
followup patch

(In reply to comment #14)
> Thanks Frank! I have committed the updated patch which is based on your
> implementation. Please take a look if the changes I made address comment 10. 
> 

Correction for jUnit Test (no longer fail).

I now think that we only support one ContentProposalPopup. So If you type "f,b" you have to do this in two steps.

Frist change to "foo, b" and then to "foo, bar"
Comment 17 Frank Becker CLA 2008-03-28 18:36:04 EDT
Created attachment 94079 [details]
mylyn/context/zip
Comment 18 Steffen Pingel CLA 2008-03-29 00:06:45 EDT
Good catch. Patch applied an IP log updated. 

> I now think that we only support one ContentProposalPopup. So If you type "f,b"
> you have to do this in two steps.
> 
> Frist change to "foo, b" and then to "foo, bar"

From the little bit of usage I have gathered on this feature so far it has been working well and only requires a few keystrokes. I think it is the least confusing user interaction that still makes it very easy to add multiple addresses.
Comment 19 Frank Becker CLA 2008-03-29 01:38:01 EDT
 (In reply to comment #18)
> 
> From the little bit of usage I have gathered on this feature so far it has been
> working well and only requires a few keystrokes. I think it is the least
> confusing user interaction that still makes it very easy to add multiple
> addresses.

If we want to do this , I need some help.
1) What i the right place to inert the logic for generate the extra keystroke
2) How do I generet the extra keystroke. 
Comment 20 Frank Becker CLA 2008-03-29 18:51:10 EDT
Created attachment 94124 [details]
Enhancement

 (In reply to comment #18)
> 
> From the little bit of usage I have gathered on this feature so far it has been
> working well and only requires a few keystrokes. I think it is the least
> confusing user interaction that still makes it very easy to add multiple
> addresses.

What is with htis implementation?

Starting with the current Cursorposition we do the content assist until we reach the left side.
Comment 21 Frank Becker CLA 2008-03-29 18:51:16 EDT
Created attachment 94125 [details]
mylyn/context/zip
Comment 22 Frank Becker CLA 2008-03-29 18:56:31 EDT
Created attachment 94126 [details]
update

Sorry I did not remove the IContentProposalListener2 from the patch.
Comment 23 Frank Becker CLA 2008-03-29 18:56:33 EDT
Created attachment 94127 [details]
mylyn/context/zip
Comment 24 Steffen Pingel CLA 2008-03-30 04:04:01 EDT
I don't quite understand how the patch improves content assist for multiple addresses. As I pointed out in comment 18 I think the current solution is sufficient.
Comment 25 Frank Becker CLA 2008-03-30 14:36:14 EDT
 (In reply to comment #24)
> I don't quite understand how the patch improves content assist for multiple
> addresses. As I pointed out in comment 18 I think the current solution is
> sufficient.

I stood under the impression that this extension was requested.

Try this:
1) open Bug http://mylyn.eclipse.org/bugs303/show_bug.cgi?id=1
2) insert 
test, rob (Insert point is after rob)
and use content assist, you get two proposals and end with
tests@mylyn.eclipse.org,rob.elves@eclipse.org

but if you place the Insert point is after test
you get one proposals and end with
tests@mylyn.eclipse.org,rob

If you think that this is not needed it is no problem to not apply this patch.

But maybe we should yue the move of the insert point to the new position.

Thoughts?

 
 
Comment 26 Mik Kersten CLA 2008-04-08 19:33:46 EDT
Awesome to finally have this, thanks Frank!