Bug 184830 - [DataBinding] Introduce a map entry observable value
Summary: [DataBinding] Introduce a map entry observable value
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Matthew Hall CLA
QA Contact:
URL: https://dev.eclipse.org/ipzilla/show_...
Whiteboard:
Keywords: api, contributed
Depends on:
Blocks:
 
Reported: 2007-05-01 05:41 EDT by Marko Topolnik CLA
Modified: 2008-03-27 14:53 EDT (History)
2 users (show)

See Also:


Attachments
MapEntryObservableValue, a test for it, additions to Observables and WritableMap (14.05 KB, patch)
2007-05-01 05:44 EDT, Marko Topolnik CLA
no flags Details | Diff
Final patch pending answer from Marko on copyright info (22.03 KB, patch)
2008-03-05 19:34 EST, Matthew Hall CLA
no flags Details | Diff
mylyn/context/zip (4.29 KB, application/octet-stream)
2008-03-05 19:34 EST, Matthew Hall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Topolnik CLA 2007-05-01 05:41:40 EDT
It is a typical situation that a bean has several related properties aggregated into a map instead of having a separate getter/setter for each one. There is also typically a predefined set of keys for entries in this map, making each entry semantically equivalent to a standalone bean property. A common example would be a map of phone numbers with keys like HOME, WORK, CELL, FAX. A GUI form for editing such a bean should not make any distinction between standalone properties and keyed properties such as these. Therefore it is a common requirement to have an observable value bound to a specific map entry. I propose such an observable in the patch that will be attached.
Comment 1 Marko Topolnik CLA 2007-05-01 05:44:16 EDT
Created attachment 65457 [details]
MapEntryObservableValue, a test for it, additions to Observables and WritableMap
Comment 2 Boris Bokowski CLA 2007-05-01 11:04:32 EDT
Thanks for the contribution!
Comment 3 Boris Bokowski CLA 2008-02-03 22:18:47 EST
Marko, for IP process reasons, we would need your employer's name, and the following (please respond on this bug):

a.  Confirm you authored 100% of the code
b.  Confirm you have the rights to donate the code to Eclipse
c.  Confirm you are submitting the code for inclusion in future Eclipse releases under the Eclipse Public License

Thanks!
Comment 4 Marko Topolnik CLA 2008-02-04 03:14:24 EST
I don't have any experience on how to phrase these confirmations that you need from me, so I'll make it plain and simple...

I confirm:

a.  that I authored 100% of the code;

b.  that I have the rights to donate the code to Eclipse;

c.  that I am submitting the code for inclusion in future Eclipse
releases under the Eclipse Public License.

My employer is CROZ d.o.o, based in Zagreb, Croatia.
Comment 5 Boris Bokowski CLA 2008-02-13 17:25:01 EST
This contribution has been approved by the Eclipse Foundation legal staff.
Comment 6 Matthew Hall CLA 2008-03-05 14:31:00 EST
Quick poll:

Observables.observeMapEntryValue(IObservableMap, Object key, Object valueType)
Observables.observeDetailMapEntryValue(IObservableMap, IObservableValue masterKey, Object valueType)

or:

MapObservables.observeEntryValue(IObservableMap, Object key, Object valueType)
MapObservables.observeDetailEntryValue(IObservableMap, IObservableValue masterKey, Object valueType)
Comment 7 Matthew Hall CLA 2008-03-05 18:08:11 EST
Marco: I need to update the authorship comments, as all your files had IBM as the copyright owner.  Are you contributing this under your name or your employer's?
Comment 8 Matthew Hall CLA 2008-03-05 19:34:45 EST
Created attachment 91709 [details]
Final patch pending answer from Marko on copyright info
Comment 9 Matthew Hall CLA 2008-03-05 19:34:49 EST
Created attachment 91710 [details]
mylyn/context/zip
Comment 10 Marko Topolnik CLA 2008-03-06 04:24:27 EST
(In reply to comment #7)

Matthew, I am contributing this under my name.
Comment 11 Matthew Hall CLA 2008-03-06 13:26:36 EST
Released to HEAD > 20080306

Thanks for the contribution!

New API:
Observables.observeMapEntry(IObservableMap map, Object key, Object valueType)
Observables.mapEntryValueFactory(IObservableMap map, Object valueType)
Observables.observeDetailMapEntry(IObservableMap map, IObservableValue master, Object valueType)
Comment 12 Matthew Hall CLA 2008-03-27 13:44:40 EDT
Verified by code inspection in I20080327-0100.