Bug 58777 - [Viewers] add API to not deactivate CellEditor on FocusLost
Summary: [Viewers] add API to not deactivate CellEditor on FocusLost
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
: 183627 212232 (view as bug list)
Depends on: 181828
Blocks: 53629
  Show dependency tree
 
Reported: 2004-04-16 03:00 EDT by Markus Keller CLA
Modified: 2008-04-22 15:36 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2004-04-16 03:00:36 EDT
TableViewerImpl installs a FocusListener on CellEditors, which calls
applyEditorValue() on focusLost events.

This FocusListener must be removed since applying the editor value is not always
the wanted behavior on focusLost. Subclasses of CellEditor already handle focus
loss in an extensible way: they install their own FocusListener and call a hook
method focusLost() (which can be extended or reimplemented by subclasses with
special needs).

To support content assist in table cells (such as in the Change Method Signature
dialog), we need to stay in editing mode even while the proposal list has focus.
This is currently not implementable, since TableViewerImpl deactivates the
CellEditor even if the CellEditor's focusLost() is reimplemented.

The fix is to simply remove the redundant FocusListener in TableViewerImpl.
Comment 1 Tod Creasey CLA 2004-04-16 16:22:35 EDT
I think this would be a significant behaviour change for everyone who is using 
our cell editors - in 3.0 we have already had a lot of problem with some 
subtle changes to widgetDefaultSelect that generated a slew of problems. Any 
behavioural changes need to be considered carefully and post 3.0.
Comment 2 Tod Creasey CLA 2004-04-16 16:23:02 EDT
Marking later as these needs to be more carefully considered
Comment 3 Tod Creasey CLA 2004-06-28 11:27:59 EDT
Reopening now that 3.0 has shipped
Comment 4 Markus Keller CLA 2006-07-10 04:40:41 EDT
I would appreciate if this could be looked at in the 3.3 cycle. It makes e.g. code assist in CellEditors very hard to implement nicely.
Comment 5 Thomas Schindl CLA 2006-09-19 05:44:19 EDT
Maybe now it's a good time to think of this once more. In M3 if we integrate the Widget-Independency (bug #154329) we will refactor the Table/TreeEditorImpl completely and it is a use case for EditorActivation (bug #87733) which I'd like to integrate into EditingSupport.
Comment 6 Thomas Schindl CLA 2006-11-28 10:51:00 EST
Tod/Boris why do we need we have our own FocusListener attached to the editor-control? We are already attaching an ICellEditorListener isn't that enough? I think this would solve the problem Markus is referring to, right I've tested a little but and could find any thing not working as before from a usablility?
Comment 7 Markus Keller CLA 2007-04-12 04:42:20 EDT
Once bug 181828 is fixed, this bug transforms into a request to make CellEditor#dependsOnExternalFocusListener() API, such that third-party CellEditors can also profit from the fix.
Comment 8 Thomas Schindl CLA 2007-12-03 10:58:52 EST
Boris, thoughts? We didn't have any complaints from people since we shiped 3.3 so I think we could savely make this API.
Comment 9 Boris Bokowski CLA 2007-12-03 12:47:15 EST
(In reply to comment #8)
> Boris, thoughts? We didn't have any complaints from people since we shiped 3.3
> so I think we could savely make this API.

+1 for making it API.
Comment 10 Dale Swift CLA 2007-12-09 16:04:18 EST
*** Bug 212232 has been marked as a duplicate of this bug. ***
Comment 11 Boris Bokowski CLA 2007-12-09 20:25:55 EST
Fix released to HEAD.
Comment 12 Boris Bokowski CLA 2007-12-11 10:54:10 EST
Verified by code inspection using I20071211-0010.
Comment 13 Anthony Hunter CLA 2008-04-22 15:36:40 EDT
*** Bug 183627 has been marked as a duplicate of this bug. ***