Bug 540355 - [DataBinding] Deprecate ViewersObservables methods
Summary: [DataBinding] Deprecate ViewersObservables methods
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.12 M1   Edit
Assignee: Jens Lideström CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 546820
  Show dependency tree
 
Reported: 2018-10-22 03:48 EDT by Jens Lideström CLA
Modified: 2019-04-29 08:13 EDT (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 2018-10-22 03:48:46 EDT
ViewerObservables have been superseded by ViewerProperties in the
same way as SWTObservables was superseded by WidgetProperties. The observable factories in ViewerObservables should be deprecated so that there is only one canonical way to create viewer observables, and one place where that has to be maintained.

ViewersObservables has the method observeDelayedValue that is not in ViewersProperties:

https://git.eclipse.org/r/plugins/gitiles/platform/eclipse.platform.ui/+/master/bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ViewersObservables.java?id=6f92cd6dde71e17f0d014c5fe72f89b905ab0de2#66

Since ViewersObservables is a sensible place for that method only the other methods should be deprecated, not the ViewersObservables class itself.
Comment 1 Jens Lideström CLA 2018-10-22 03:57:51 EDT
(In reply to Lars Vogel from comment #15)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327086#c15

> Why not adding this method to Viewers Properties?

We could do that.

My motivation for thinking that the method (observeDelayedValue) should remain on ViewersObservables is that it deals only with observables, not with properties.

But a slight disadvantage of that solution is that there will be only one non-deprecated method on ViewersObservables, and maybe that makes it harder for users to find it.
Comment 2 Lars Vogel CLA 2019-02-28 04:59:59 EST
(In reply to Jens Lideström from comment #1)
> (In reply to Lars Vogel from comment #15)
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=327086#c15
> 
> > Why not adding this method to Viewers Properties?
> 
> We could do that.
> 
> My motivation for thinking that the method (observeDelayedValue) should
> remain on ViewersObservables is that it deals only with observables, not
> with properties.
> 
> But a slight disadvantage of that solution is that there will be only one
> non-deprecated method on ViewersObservables, and maybe that makes it harder
> for users to find it.

I suggest to start with this solution (deprecate all but one method) to improve the current situation.

Jens, please provide Gerrit.
Comment 3 Eclipse Genie CLA 2019-03-03 09:22:41 EST
New Gerrit change created: https://git.eclipse.org/r/137941
Comment 4 Jens Lideström CLA 2019-03-03 09:23:34 EST
The Gerrit change above should resolve the issue.
Comment 5 Eclipse Genie CLA 2019-03-03 09:44:58 EST
New Gerrit change created: https://git.eclipse.org/r/137943
Comment 7 Lars Vogel CLA 2019-03-21 10:51:02 EDT
Thanks, Jens.