Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-dev] New fluent databinding API

I have developed a new fluent databinding API.

I'd really like suggestions and feedback!

The new API is a wrapper for the traditional databinding API.

It looks like this:

Bind.twoWay()
    .from(value)
    .validateAfterConvert(modelValidator)
    .convertTo(IConverter.create(i -> Objects.toString(i, "")))
    .convertFrom(IConverter.create(s -> s.isEmpty() ? 0 : Integer.decode(s)))
    .to(WidgetProperties.text(SWT.Modify).observe(text))
    .validateTwoWay(widgetValidator)
    .bind(bindingContext);

Please comment on the following Bugzilla ticket if you have suggestions,
feedback, or just think this is a good or bad idea!

https://bugs.eclipse.org/bugs/show_bug.cgi?id=552667

Best regards,
Jens Lideström




Back to the top