DESCRIPTION

Bug 335792 - Observables and property plugins - the generics type
             parameters need to be specified in data binding classes

Change-Id: I0789ca45da254f67b9644d5b88d6438242d66e3c
Signed-off-by: Kelly Potter xxx@xxx.xxx


COMMENTS

author: Kelly Potter
date: 2015-06-18 02:59:18.000000000

Uploaded patch set 6.

-------------------------------------
author: Brenden Conley
date: 2015-06-18 02:59:24.000000000

Patch Set 6:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5886/

-------------------------------------
author: Brenden Conley
date: 2015-06-18 03:04:04.000000000

Patch Set 6: Verified-1

Build Failed 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/5886/ : FAILURE

-------------------------------------
author: Krista Shepherd
date: 2015-06-18 14:20:03.000000000

Patch Set 6:

(3 comments)

I think we should deprecate all constructors and methods, which contain the elementType information, since this will not be necessary any more with generics. I made some inline comments as an example.

Line:75, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java -> I suggest to deprecate all constructors, where an elementType is passed and offer new constructors without an elementType parameter

Line:301, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java -> I think we should also deprecate this method, since we now already have the generic type.

Line:47, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java -> With generics we do not need the elementType any more, therefore we should also deprecate this method.

-------------------------------------
author: Kelly Potter
date: 2015-06-18 14:48:29.000000000

Patch Set 6:

(3 comments)

Line:75, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java -> See my comments, above.

Line:301, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/list/WritableList.java -> See my other comments, above. I agree with deprecating element types and everything that uses them but don't think this should be done as part of this change.

Line:47, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.java -> I agree that the element types were never useful and that they should be removed, but I disagree with your reason for doing so.

Generics are a compile-time thing and element types were always a runtime thing. They are used for dynamically looking up declarative converters in methods like UpdateListStrategy.fillDefaults, so generics could not be used as a replacement.

I agree that they're useless because IMO this sort of dynamic binding isn't itself a useful pattern. However, since deprecating getElementType has nothing to do with the addition of generics, I'd suggest we do it as a separate change (we'd also have to deprecate everything that uses or implements such dynamic bindings).

For more context, here is the bug where we first suggested removing getElementType from the observables:

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

-------------------------------------
author: Gerrit Code Review
date: 2015-07-17 23:05:57.000000000

Change has been successfully merged into the git repository by Kelly Potter

-------------------------------------
