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 195048 - [70cat] REGRESSION: Generating method with comment no longer works
Summary: [70cat] REGRESSION: Generating method with comment no longer works
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2011-02-03 18:25 UTC by misterm
Modified: 2011-02-05 06:09 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 misterm 2011-02-03 18:25:29 UTC
An internal hint plugin does the following method calls, successfully adding a method with a javadoc comment to a class, which works (and worked to some point in time in trunk) in 6.9:

MethodTree mt = treeMaker.Method(ModifiersTree, CharSequence, Tree, List<? extends TypeParameterTree>, List<? extends VariableTree>, List<? extends ExpressionTree>, BlockTree, ExpressionTree);
final Comment comment = Comment.create(Style.JAVADOC, -2, -2, -2, "/**\n*@SomeAnnotation\n*/);
treeMaker.addComment(mt, comment, true);
final GeneratorUtilities utilities = GeneratorUtilities.get(wc);
ClassTree nt = utilities.insertClassMember(classTree, mt);
final VariableTree vt = treeMaker.Variable(ModifiersTree, CharSequence, Tree, ExpressionTree);
nt = utilities.insertClassMember(nt, vt);
nt = utilities.insertClassMember(nt, utilities.createGetter(vt));
nt = utilities.insertClassMember(nt, utilities.createSetter(nt, vt));
nt = utilities.importFQNs(nt);
wc.rewrite(classTree, nt);

Method "mt" used to be generated with proper Javadoc and now gets none.

Product Version = NetBeans IDE Dev (Build 110201-027c9a2e0e3c)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) Client VM 16.2-b04
Comment 1 Jan Lahoda 2011-02-03 22:16:52 UTC
Hm, seems that a cleanup cleaned a bit too much:
http://hg.netbeans.org/jet-main/rev/0158974648f3
Comment 2 Quality Engineering 2011-02-05 06:09:03 UTC
Integrated into 'main-golden', will be available in build *201102050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0158974648f3
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #195048: need to keep the comments through GeneratorUtilities.importFQNs