Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipse-pmc] Re: API request: Add API to expand SWT support in Data Binding

After some discussion we'd like to refine our request. 

For #3 we'd like to just have SWTObservables and no CompatibleSWTObservables.  To account for needing to be able to run against SWT 3.2 we want to make all methods accept type Control rather than specific Controls.  We'll have to document heavily what widgets are supported but by not having widget types in the method signatures we shouldn't have issues with version dependencies.

The new API will be:
* SWTObservables.observeSelection(Control control)
* SWTObservables.observeMin(Control control)
* SWTObservables.observeMax(Control control)
* SWTObservables.observeEditable(Control control)
* SWTObservables.observeDate(Control control)

This will also mean that existing methods will be changed to accept Control.

Thanks,
Brad Reynolds

On Mar 15, 2007, at 1:57 PM, Brad Reynolds wrote:

This is a request to add new API to Data Binding that allows the following:
1) observables for Scale selection, min, and max
2) observables for Text.getEditable()
3) observable for DateTime (new in SWT 3.3)

1 and 2 are trivial.  The new API will be...
* SWTObservables.observeSelection(Scale scale)
* SWTObservables.observeMin(Scale scale)
* SWTObservables.observeMax(Scale scale)
* SWTObservables.observeEditable(Text text)

For #3 we're wanting to introduce CompatibleSWTObservables as a superclass of SWTObservables.  This class will support SWT 3.2 only and SWTObservables will then contain the SWT 3.3 references.  SWTObservables will then have to override all methods in CompatibleSWTObservables to avoid compiler errors.  The goal for CompatibleSWTObservables will be to provide support for the previous SWT release.  Then for DateTime we'll add the following API...

SWTObservables.observeDate(DateTime dateTime)

Goals/Benefits:
Consumers will be able to observe additional widgets and attributes of SWT.  Consumers will also be able to run Data Binding against 3.2.x while we provide support for 3.3.

Corresponding bug:
[DataBinding] SWT Observable API additions - https://bugs.eclipse.org/bugs/show_bug.cgi?id=177463
This bug is an aggregate of the individual enhancement requests.

Risks:
1 and 2 pose no risks as it is new API.  3 could throw a ClassNotFound exception for clients if referencing SWTObservables while depending upon SWT 3.2.x.  The fix would be for them to reference CompatibleSWTObservables.
Performance Impact:
No performance impact.

Thanks,
Brad Reynolds



Back to the top