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 99329 - New line appears between method and its javadoc
Summary: New line appears between method and its javadoc
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks: 90451
  Show dependency tree
 
Reported: 2007-03-29 01:25 UTC by _ deva
Modified: 2007-05-17 10:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test module to reproduce the bug (19.20 KB, application/octet-stream)
2007-03-29 01:26 UTC, _ deva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ deva 2007-03-29 01:25:31 UTC
If a method and its javadoc is added programatically as follows
  MethodTree m = make.Method(...);        
  ClassTree modifiedClazz = make.insertClassMember(..., m);
  Comment comment = Comment.create(Comment.Style.JAVADOC, -2, -2, -2, "Test 
comment");
  make.addComment(m, comment, true);

method and javadoc are succesfully created but a blank line exists between the 
two
Comment 1 _ deva 2007-03-29 01:26:04 UTC
Created attachment 40116 [details]
Test module to reproduce the bug
Comment 2 _ deva 2007-03-29 01:29:25 UTC
Build and install the attached module and follow these steps to reproduce the 
bug
1) Open the file TestClass.java which is part of the project
2) Select Refactor|Insert Member

Look at the method being inserted before the constructor. You will see that a 
blank line appears between the inserted method and its javadoc
Comment 3 Pavel Flaska 2007-05-17 10:07:55 UTC
Fixed, regression test provided.

Checking in src/org/netbeans/modules/java/source/pretty/VeryPretty.java;
/cvs/java/source/src/org/netbeans/modules/java/source/pretty/VeryPretty.java,v 
<--  VeryPretty.java
new revision: 1.21; previous revision: 1.20
done
Checking in test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java;
/cvs/java/source/test/unit/src/org/netbeans/api/java/source/gen/CommentsTest.java,v
 <--  CommentsTest.java
new revision: 1.15; previous revision: 1.14
done