| Summary: | [dnd] Dropping method inside an enum causes exceptions | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jörg Thönnes <jtk499> | ||||||
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | daniel_megert | ||||||
| Version: | 3.2 | Keywords: | helpwanted | ||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
|
Description
Jörg Thönnes
Created attachment 231089 [details]
Stripped down example code
Attached my code (removed package, comments and renamed some item).
Created attachment 231090 [details]
Screen shot of insertion point.
The same also happens if moving one method exactly between enum name and first enum definition.
Sorry, screen is broken, but maybe you get the point... Now as I moved the method by hand I noted that the place at the beginning is syntactically incorrect :-) But normally Eclipse would allow this move and just decorate the moved lines with error indicators. So I continue to see this as a bug. Dropping almost anywhere causes an issue:
Simpler test case:
public enum Bug {
TEST() {
};
public void dndMeAboveTEST() {
}
}
Dropping above TEST, causes the AIOOBE, dropping below TEST copies the method and dropping into TEST causes an NPE.
Will this issue be corrected? (In reply to comment #6) > Will this issue be corrected? Definitely not for Kepler and it's not high on our list. A patch is welcome. Dani, I am sorry, but I am no GUI developer at all, JEE is my main focus. Therefore, I cannot supply any patches. Actually, I wonder whether this bug is so complicated that it will not be corrected for the next major release. I would expect that corrections always supersede new features. Thanks, Jörg (In reply to comment #8) > I would expect that corrections always supersede new features. That's the wrong expectation then. Of course critical bugs will be addressed before new features. But I'll invest the resources rather into a new feature than working on a DnD bug, which no one reported for the past 7 years. Plus, since it is open source, anyone who finds the bug important enough, can invest his own time to address the problem. OK, understood that you have different priorities and cannot fulfill my expectations. But it could as well be a regression introduced by recent changes. This could also explain no reports for 7 years. Thanks, Jörg (In reply to comment #10) > OK, understood that you have different priorities and cannot fulfill my > expectations. But it could as well be a regression introduced by recent > changes. If I set the version to '3.2' it really means that the bug is in there since 3.2 ;-). :-) not intended to argue too much... Do you have some pointers where to start looking for this issue? From the stack trace I would conclude the package "org.eclipse.jdt.internal.corext.refactoring.reorg" which sounds more like the JDT refactoring than UI. (In reply to comment #12) > :-) not intended to argue too much... > > Do you have some pointers where to start looking for this issue? > > From the stack trace I would conclude the package > "org.eclipse.jdt.internal.corext.refactoring.reorg" > which sounds more like the JDT refactoring than UI. The corext packages contain extensions to JDT Core, which live in JDT UI. http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/ http://wiki.eclipse.org/JDT_UI/How_to_Contribute#Contributing_Code gives an entry point on how to contribute code. Thanks, Jörg. 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. |