Summary: | [quick fix] Diamond operator prevents suggesting the creation of a new constructor | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Lukas Eder <lukas.eder> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | REOPENED --- | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 4.5 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Whiteboard: | stalebug |
Description
Lukas Eder
2015-02-21 11:07:59 EST
I'm using 4.5.0 M5, btw. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. With Eclipse 4.15.0, things got worse. I'm now no longer offered any quick fixes on the wrong code! When I remove the diamond operator... ------------------------------------------------------ class Tuple2<T1, T2> { static <T1, T2> Tuple2<T1, T2> tuple(T1 t1, T2 t2) { return new Tuple2(t1, t2); } } ------------------------------------------------------ I now get quick fix options, including the desired one to generate the constructor: ------------------------------------------------------ class Tuple2<T1, T2> { public Tuple2(T1 t1, T2 t2) { // TODO Auto-generated constructor stub } static <T1, T2> Tuple2<T1, T2> tuple(T1 t1, T2 t2) { return new Tuple2(t1, t2); } } ------------------------------------------------------ But now, with the removed diamond operator, I'm getting a rawtype warning, obviously. So I have to re-add the diamond operator. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |