| Summary: | [quick fix] add constructor does not work if superconstructor is invisible | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Brian.Miller, dirk_baeumer |
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Tobias, can you please comment on whether this is the same code. No, this is not the same code. The source actions do not offer super constructors which are not visible. We should either issue an error if invisible constructors would be called or offer them anyway to let the user fix the problem afterwards. Tobias, can we offer the constructor and somehow mark them (special icon) so that the user now that they are in fact invisible. Can you do the change and then forward the bug to Martin to comment on the quick fix. I agree that offering to invoke an invisible superconstructor would be bad. But all superconstructors in the same compilation unit are implicitly visible, and should be offered. 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. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. 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. |
I20050906-1200 public class Claws { private Claws(int i) { } } class Extends extends Claws { } For "Extends", there's a quick fix lightbulb, but when you click on it, the only proposal is "Rename in File". The lightbulb should not show up if there's no quick fix. OTOH, I think it would be good to just create the constructor and call the invisible superconstructor. That would at least tell the user in an error, that the superconstructor is not visible (and allows to correct it with another quick fix). The "Source > Add Constructors from Superclass" action does not show the private superconstructor but only offers the constructor from Object, which is also wrong. I guess that's the same code; if not, I can open another bug report for the source action.