Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 119264 - [DataBinding] Tables and TableViewers should always use IUpdatables gotten from the SWT factory to manage their cell editors
Summary: [DataBinding] Tables and TableViewers should always use IUpdatables gotten fr...
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-05 11:18 EST by Dave Orme CLA
Modified: 2009-09-11 10:14 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Orme CLA 2005-12-05 11:18:16 EST
Currently we have invented *two* ways to keep data in sync: IUpdatable, which is our API, and an internal API we just as a special case in our support for table and table viewers.

There are several problems with this:

1) The simplest possible implementation of Undo/Redo support is described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=116465#c0.  It relies on being able to capture all editing events in the data binding framework by wrapping the JavaBeansUpdatable** classes in UndoableUpdatableValue, and UndoableUpdatableCollection objects.  When the wrapper class receives a request to change a value or a collection, instead of directly editing the value or collection, it creates a command object that it places on Eclipse's undo/redo stack, that implements the actual edit, undo, and redo using a real JavaBeansUpdatable object.

However, since some of our edits don't go through the IUpdatable interface, it becomes impossible for clients to override the editor behavior in important cases like custom undo/redo.

2) Field-level validation is already implemented using IUpdatable.  By using a custom update mechanism in tables, we have to have a custom validation mechanism.  This validation mechanism suffers from the same deficiency as the editing mechanism: It can't be overridden by clients.  Why would somebody want to override it?  Here's one use-case that has come up on the newsgroups: masked editing.

All of this points to the need for *all* editors in the data binding framework to use IUpdatable or some varient that is a part of the public API.
Comment 1 Dave Orme CLA 2006-02-06 18:24:57 EST
The patch that went in last week fixes this as long as the table is bound using a TableModelDescription.
Comment 2 Boris Bokowski CLA 2006-02-16 12:49:01 EST
Reopening to make sure we cover this in the refactored framework.
Comment 3 Boris Bokowski CLA 2006-04-12 14:08:12 EDT
Sorry, but I don't have time left in 3.2 to address this.
Comment 4 Boris Bokowski CLA 2007-06-26 13:45:11 EDT
This bug has become stale.