| Summary: | [DataBinding] Option to specify default values for DuplexingObservableValue instead of subclassing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Matthew Hall <qualidafial> | ||||||
| Component: | UI | Assignee: | Matthew Hall <qualidafial> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | bokowski | ||||||
| Version: | 4.0 | ||||||||
| Target Milestone: | 3.5 M6 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Matthew Hall
Refining the use case a bit: Iterate the collection and: * return a predefined "empty" value if empty * return the first element if there is only one element * return the first element if all other elements are equals() to it * return a predefined "multi" value otherwise Changed the method signature to: public static DuplexingObservableValue withDefaults(IObservableList target, Object emptyValue, Object multiValue); Created attachment 124747 [details]
Patch
Also changed Snippet028 to customize multi-value message for each property, e.g. "<Multiple titles>", "<Multiple directors>", etc
Created attachment 124748 [details]
mylyn/context/zip
Boris, +1? Released to HEAD > 20090205 |