Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327086 - [DataBinding] Deprecate binding methods of SWTObservables
Summary: [DataBinding] Deprecate binding methods of SWTObservables
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.5 M1   Edit
Assignee: Lars Vogel CLA
QA Contact: Matthew Hall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 435475
  Show dependency tree
 
Reported: 2010-10-06 06:36 EDT by Lars Vogel CLA
Modified: 2018-10-22 03:50 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2010-10-06 06:36:06 EDT
As far as I know the Properties API superseed the old factory methods for example:

EMFObservables
SWTObservables

Would it be possible to deprecate the old factories so that new people start with the "right" approach?

Best regards, Lars
Comment 1 Lars Vogel CLA 2010-10-06 06:37:02 EDT
Adding Tom to get his opinion.
Comment 2 Thomas Schindl CLA 2010-10-06 06:46:32 EDT
Yes - we already have such a thing for EMF in the queue (bug 296147) but couldn't because we had one method not ported to EMFProperties until 2.6M7 (bug 296153) and this would have produced a lot confusion to all users of EMFObservables at a very late point in the cycle
Comment 3 Matthew Hall CLA 2010-10-12 23:27:23 EDT
I'm for it.

Although WidgetProperties still depends on SWTObservables.getRealm so we'd have to move that method somewhere else.
Comment 4 Lars Vogel CLA 2013-07-23 15:49:21 EDT
Maybe we can deprecate the observe* methods, so that getRealm() can still be used in SWTObservables? If that sounds like a doable thing, I'm happy to provide a Gerrit review request.
Comment 5 Nigel Westbury CLA 2013-07-23 16:56:05 EDT
You might have noticed that the methods have mostly been deprecated in SWTObservables (e4 project) anyway.  This was done because the methods took a control that had to be a control of a type that supported the given property.  It was not possible to add generics in a clean manner, so each method was split into a different method for each particular control type.

Perhaps we need to remove the new methods that replaced the deprecated methods.
Comment 6 Lars Vogel CLA 2014-03-11 09:12:21 EDT
Marking as WONTFIX. Please reopen if you plan to work on this.
Comment 7 Lars Vogel CLA 2014-07-22 05:51:04 EDT
I plan to work on the deprecation of the outdated binding methods. For the realm transfer to another class I will open a new bug report.
Comment 8 Lars Vogel CLA 2014-07-22 05:57:00 EDT
https://git.eclipse.org/r/#/c/30231/
Comment 9 Matthew Hall CLA 2014-07-24 13:37:54 EDT
Thanks for taking this on Lars
Comment 10 Lars Vogel CLA 2014-07-24 14:04:58 EDT
(In reply to Matthew Hall from comment #9)
> Thanks for taking this on Lars

Fixed with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=75b50bdb237530cda68e2bd80c937b0302c8d8e0
Comment 11 Lars Vogel CLA 2014-08-05 12:43:54 EDT
.
Comment 12 Jens Lideström CLA 2018-10-21 12:17:59 EDT
Hello from the future,

Does anyone remember why ViewerObservables wasn't deprecated as part of this change?

ViewerObservables seem to have been superseded by ViewerProperties in the same way as SWTObservables was superseded by WidgetProperties.

Was there a reason, or was that class simply overlooked?

I'm asking because I'm wondering whether ViewerObservables should be updated with type parameters as part of this change:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=531748
Comment 13 Lars Vogel CLA 2018-10-21 14:46:32 EDT
(In reply to Jens Lideström from comment #12)
> Hello from the future,
> 
> Does anyone remember why ViewerObservables wasn't deprecated as part of this
> change?
> 
> ViewerObservables seem to have been superseded by ViewerProperties in the
> same way as SWTObservables was superseded by WidgetProperties.
> 
> Was there a reason, or was that class simply overlooked?
> 
> I'm asking because I'm wondering whether ViewerObservables should be updated
> with type parameters as part of this change:
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=531748

Hello person from the future. :-) I simply overlooked that class, feel free to open a new bug to deprecate that class too
Comment 14 Jens Lideström CLA 2018-10-22 03:21:13 EDT
> feel free to open a new bug to deprecate that class too

I'll do so.

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 I'll deprecate only the other methods, not the ViewersObservables class itself.
Comment 15 Lars Vogel CLA 2018-10-22 03:47:59 EDT
(In reply to Jens Lideström from comment #14)
> > feel free to open a new bug to deprecate that class too
> 
> I'll do so.
> 
> 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 I'll deprecate
> only the other methods, not the ViewersObservables class itself.

Why not adding this method to Viewers Properties?
Comment 16 Jens Lideström CLA 2018-10-22 03:50:00 EDT
(In reply to Lars Vogel from comment #15)

> Why not adding this method to Viewers Properties?

Discussion continued at bug 540355.