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 28893 - New From template generates wrong code.
Summary: New From template generates wrong code.
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 27820 28922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-11-20 23:00 UTC by Michael Ottati
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 Michael Ottati 2002-11-20 23:00:34 UTC
Using the projects build obtained from the page:

http://www.netbeans.org/download/prj40_prototype/night/buil
d200211201600/index.html

Performing the following steps: 

1:  Create a new java package under src
2:  Create a new Java file within the package.

The templates do not appear to be fixed up with the proper 
names. I tried a new Main and a new Class and both were 
left uncompilable.

I named the new "Class" file "xab", here is the result.

/*
 * xab.java
 *
 * Created on November 20, 2002, 2:35 PM
 */

package Templates.Classes;

/**
 *
 * @author  ottati
 */
public class Class {
    
    /** Creates a new instance of xab */
    public Class() {
    }
    
}

I named the new main class "HelloWorld" here is the result.

/*
 * HelloWorld.java
 *
 * Created on November 20, 2002, 2:27 PM
 */

package Templates.Classes;

/**
 *
 * @author  ottati
 */
public class Main {
    
    /** Creates a new instance of HelloWorld */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    }
    
}
Comment 1 Milan Kubec 2002-11-21 08:30:50 UTC
*** Issue 27820 has been marked as a duplicate of this issue. ***
Comment 2 Milan Kubec 2002-11-22 10:33:35 UTC
Also no chages made in NFT wizard are reflected in created class. 
Comment 3 Svata Dedic 2002-11-22 16:02:56 UTC
/cvs/java/src/org/netbeans/modules/java/JavaDataObject.java,v  <-- 
JavaDataObject.java
new revision: 1.151.2.22; previous revision: 1.151.2.21
/cvs/java/src/org/netbeans/modules/java/Attic/JavaMember.java,v  <-- 
JavaMember.java
new revision: 1.1.2.4; previous revision: 1.1.2.3
Comment 4 Tomas Hurka 2002-11-25 09:37:21 UTC
*** Issue 28922 has been marked as a duplicate of this issue. ***
Comment 5 Jan Becicka 2003-11-25 13:59:56 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as VERIFIED --->
Comment 6 Jan Becicka 2003-11-25 14:08:45 UTC
---> CLOSED