Community
Participate
Working Groups
We should add generics support to the JFace Viewers.
See also http://wiki.eclipse.org/Generify_A_Java_Project
See the hot discussion on planned approach at http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg09647.html with some objections regarding the right way to do it. One of the problems mentioned by Ed was that arrays don't play nice with generics, but JFace API's (content provider) use arrays as return values. IMHO the only right way to introduce generics in such "legacy" interfaces: public Object[] getElements(Object inputElement) is not to introduce them at all. There will be no winner after generifying such interfaces. Either one must switch from array types to Collections (and made incompatible API changes) or everyone will see lot of (sometimes unavoidable) warnings after refactoring, in a perfectly valid code.
(In reply to Andrey Loskutov from comment #2) > One of the problems mentioned by Ed was that arrays don't play nice with > generics, but JFace API's (content provider) use arrays as return values. See bug 416189.
Somewhat related, I entered bug 416639 about using covariant return types in JFace viewers.
Current work is done in a separate branch johna/402445.
Just for information, I'm continuing this work. As suggested by Lars, I forked the project on Github to work on it without disturbing anyone. I'm currently applying existing patches by Hendrik from johna/402445.
*** Bug 414057 has been marked as a duplicate of this bug. ***
*** Bug 418190 has been marked as a duplicate of this bug. ***
*** Bug 418192 has been marked as a duplicate of this bug. ***
*** Bug 412273 has been marked as a duplicate of this bug. ***
*** Bug 413974 has been marked as a duplicate of this bug. ***
*** Bug 415573 has been marked as a duplicate of this bug. ***
*** Bug 415561 has been marked as a duplicate of this bug. ***
*** Bug 413975 has been marked as a duplicate of this bug. ***
*** Bug 413978 has been marked as a duplicate of this bug. ***
*** Bug 413973 has been marked as a duplicate of this bug. ***
*** Bug 414072 has been marked as a duplicate of this bug. ***
*** Bug 416343 has been marked as a duplicate of this bug. ***
*** Bug 417724 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/54460 WARNING: this patchset contains 3265 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Should I interpret this as an effort to push this forward despite the problems, objections, and unaddressed issues in https://bugs.eclipse.org/bugs/show_bug.cgi?id=416189 or is this sandbox activity?
(In reply to Ed Merks from comment #21) > Should I interpret this as an effort to push this forward despite the > problems, objections, and unaddressed issues in > https://bugs.eclipse.org/bugs/show_bug.cgi?id=416189 or is this sandbox > activity? I don't know. But for me it is clear that those things must be addressed before committing anything to master.
(In reply to Ed Merks from comment #21) > Should I interpret this as an effort to push this forward despite the > problems, objections, and unaddressed issues in > https://bugs.eclipse.org/bugs/show_bug.cgi?id=416189 or is this sandbox > activity? I'm currently in process for rebasing the generics work onto master and afterwards I plan to look at the remaining open issues including Bug 416189 in which different opinions are expressed about the value of this work.
Too late for 4.6, and will probably never happen (for all the reasons already listed here, in dependencies, and elsewhere in mailing lists like https://dev.eclipse.org/mhonarc/lists/platform-ui-dev/msg05459.html ).