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 18939 - Add method seperates comment from previous method
Summary: Add method seperates comment from previous method
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-27 12:22 UTC by tboerkel
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tboerkel 2001-12-27 12:22:26 UTC
If I use the wizard (right mouse click on methods and then "Add Method") to
add a new method or a method is being added through synchronization, NetBeans 
makes a little mistake. For my methods, I have a comment after the "}" that 
ends a method like this:

public void oldMethod() {
...
} // oldMethod

Now the Add Method function of NetBeans adds the new method between the "}" of 
the last method and its comment like this:

  }

  public void newMethod() {
  }

 // oldMethod


It should rather add the new method in the next line after the line with the
"}" of the last method and a blank line.

The source was not loaded in the editor, when I used the wizard, so it had
nothing to do with the cursor position.

Using NetBeans 3.3 with JDK 1.4 B3.
Comment 1 Jan Lahoda 2002-01-02 13:42:46 UTC
AFAIK, this is done by Java module. Reassign back if I am wrong.
Comment 2 Jan Becicka 2002-01-07 15:59:30 UTC
I'm afraid this is not a bug. It is not clear, if the comment is part
of the method (from parser point of view :).
Comment 3 tboerkel 2002-01-07 16:24:34 UTC
OK, if it's not a bug, then can you please enhance it? ;-)
Comment 4 Svata Dedic 2002-05-21 17:47:52 UTC
Cleaning up before 4.0 planning
Comment 5 Marek Grummich 2002-07-19 16:53:22 UTC
Target milestone was changed from not determined to TBD
Comment 6 Jan Becicka 2007-09-19 14:07:55 UTC
Wizard was removed.