This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 137139 - Generating constructor removes inner class
Summary: Generating constructor removes inner class
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-12 21:40 UTC by Miloslav Metelka
Modified: 2008-09-04 13:23 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miloslav Metelka 2008-06-12 21:40:45 UTC
Today's dev build 080612. Have a following class:

package bugs;

public final class B {
    
    private final class C1 {
C|
    }

    private final class C2 {
        int i;
    }

}

where '|' denotes cursor position. Now press Ctrl+Space and code completion offers "C1() - generate". If I press Enter
the constructor gets generated but the whole C2 definition will disappear. The "C" before caret is important without it
the generation works correctly.
Comment 1 Jan Lahoda 2008-06-17 09:43:44 UTC
I was not able to reproduce as such (an assertion failed for me, but results could be ugly with assertions disabled),
but hopefully fixed by:
http://hg.netbeans.org/main?cmd=changeset;node=4823969883db

Jirka, might be a good candidate for a 6.1 patch.
Comment 2 Jiri Prox 2008-06-17 09:55:20 UTC
Yes I agree, this is good candidate for patch
Comment 3 rbalada 2008-07-17 11:50:54 UTC
Jirko/Milo,

could you please verify fix for this issue in trunk builds?

Thanks,
-R
Comment 4 Jiri Prox 2008-07-28 13:22:28 UTC
verified in trunk


Product Version: NetBeans IDE Dev (Build 20080728044253)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)
Comment 5 rbalada 2008-07-28 17:18:24 UTC
I've transplanted the changeset http://hg.netbeans.org/main?cmd=changeset;node=4823969883db into release61_fixes
repository as http://hg.netbeans.org/release61_fixes/rev/6b425a23902b
Comment 6 Jiri Prox 2008-08-21 09:08:44 UTC
verified in patch