Bug 577996 - [Databinding] Add shortcut from/to methods to Bind API
Summary: [Databinding] Add shortcut from/to methods to Bind API
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.23   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jens Lideström CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 552667
Blocks:
  Show dependency tree
 
Reported: 2021-12-30 05:45 EST by Jens Lideström CLA
Modified: 2022-01-08 16:04 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Lideström CLA 2021-12-30 05:45:53 EST
Add utility shortcut methods for common cases to the Bind databinding API.

Examples:

* Automatically create ComputedValue/List/Set for the from-end. 
* Automatically create converterd observables for the to-end.
Comment 1 Eclipse Genie CLA 2022-01-02 10:03:47 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/189221
Comment 2 Eclipse Genie CLA 2022-01-02 10:03:52 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/189222
Comment 3 Jens Lideström CLA 2022-01-08 16:04:27 EST
@Erdal Karaca:

I implemented one of the methods that you suggested in bug 552667.

I think it is a good idea to add similar shortcuts to the Bind API!

I also added a shortcut method to bind using a method directly:

Bind.oneWay()
    .fromComputed(() -> observable.getValue() + " - Computed!")
    .toSetter(someObject::setSomeProperty)
    .bind(context);