Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 137139 - Generating constructor removes inner class
Generating constructor removes inner class
Status: VERIFIED FIXED
Product: java
Classification: Unclassified
Component: Editor
6.x
PC All
: P2 (vote)
: 6.x
Assigned To: Jan Lahoda
issues@java
61fixes3-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo