Community
Participate
Working Groups
In Bug 387272 we introduced a selection listener to the button templates. Now that SWT has lambda helper methods for SelectionListener I suggest updating the template.
New Gerrit change created: https://git.eclipse.org/r/111261
Few points to consider in this change: - The updated template based on lambda expression will give compile error for projects < Java 8. - If this is accepted, it should be done for all other applicable templates also. - Based on the discussion in bug 387272, need to check with Dani regarding the addition of quotes in setText().
(In reply to Noopur Gupta from comment #2) > Few points to consider in this change: > > - The updated template based on lambda expression will give compile error > for projects < Java 8. > > - If this is accepted, ... This is a no go. We first have to fix bug 95787. And we definitely don't want to duplicate the template(s) based on the Java version. > - Based on the discussion in bug 387272, need to check with Dani regarding > the addition of quotes in setText(). This change has nothing to do with this bug report ;-). And we don't want quotes there as per previous comments.
Dani, Noopur, since 1-2 years SWT requires Java 8.
(In reply to Lars Vogel from comment #4) > Dani, Noopur, since 1-2 years SWT requires Java 8. It is irrelevant what SWT requires. It is relevant what clients use. Just take a quick look at https://www.eclipse.org/projects/project-plan.php?planurl=http://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_8.xml#appendix ==> many of projects are below 1.8. If it is important to you, to add the template, take some time and provide a fix for bug 95787. That would be welcome by many others, including myself ;-).
(In reply to Dani Megert from comment #5) > (In reply to Lars Vogel from comment #4) > > Dani, Noopur, since 1-2 years SWT requires Java 8. > > It is irrelevant what SWT requires. It is relevant what clients use. I think we should focus on supported Java versions and not unsupported ones. AFAIK Java 7 and lower are not supported anymore. Projects which are in maintenance mode are less likely to create new code compared to new projects and new code would IMHO benefit from lambda based temmplates.