Bug 287974 - [FieldAssist] Make acceptance strategy for ContentProposalAdapter configurable
Summary: [FieldAssist] Make acceptance strategy for ContentProposalAdapter configurable
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-28 10:00 EDT by Stijn van Drongelen CLA
Modified: 2021-03-19 12:42 EDT (History)
2 users (show)

See Also:


Attachments
Patch to allow proposal acceptance by (widget) traversal (3.15 KB, patch)
2009-08-28 10:00 EDT, Stijn van Drongelen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stijn van Drongelen CLA 2009-08-28 10:00:09 EDT
Created attachment 145939 [details]
Patch to allow proposal acceptance by (widget) traversal

I'm currently polishing an application written for the Eclipse platform (i.e. using the proper APIs from the platform), in order to make it more maintainable. The application is mainly intended to enter and edit grid-like data, and some of the cell editors for the fields are hooked by a ContentProposalAdapter.

The users like the 'old' feature that, whenever they press the Tab key, the currently selected proposal is accepted AND the cursor moves to the next cell.

In my attempt to reimplement this behaviour in a new editor, I noticed why the old version had its own copy-pasted version of CPA: there is no way the original implementation of CPA allows this kind of behaviour. So alas, I too had to copy-paste CPA and hack it, and the attached patch is the result.

This patch adds yet another parameter to ContentProposalAdapter's constructor, allowing configuration of the 'acceptance strategy'. If ACCEPTANCE_TRAVERSE_WIDGET is passed as the last argument of CPA, then the CPA will automatically accept the selected proposal when a traversal event is received by the 'real' widget. If 0 is passed, the original behaviour is retained.

Note: the patch also removes some warnings regarding templates; I didn't remove this from the patch, as these changes do nothing and should be pretty easy to spot anyway.
Comment 1 Prakash Rangaraj CLA 2009-08-31 11:48:29 EDT
Changing the component & owner.
Thanks Remy
Comment 2 Eclipse Webmaster CLA 2019-09-06 16:19:14 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 3 Stefan Winkler CLA 2021-03-19 12:42:46 EDT
Hi, 

I came over this item today, because I have the very same problem in a RCP application I am developing with a customer. I would be willing to create a Gerrit change for this, but the original poster sadly does not have a valid ECA (anymore?).

So what would be the process here. Could I just take the patch, get it in shape and create a Gerrit change? Or do we need to ask the original contributor for an agreement to use this?