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 175020 - Adding GeneratorUtilities.copyComments method
Summary: Adding GeneratorUtilities.copyComments method
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: apireviews
Depends on:
Blocks: 170213
  Show dependency tree
Reported: 2009-10-20 15:28 UTC by Jan Lahoda
Modified: 2009-10-28 19:45 UTC (History)
2 users (show)

See Also:
Exception Reporter:

Proposed patch. (7.04 KB, patch)
2009-10-20 15:29 UTC, Jan Lahoda
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2009-10-20 15:28:41 UTC
I would like to add a GeneratorUtilities.copyComments method, which would copy comments from one tree to another tree.
Comment 1 Jan Lahoda 2009-10-20 15:29:59 UTC
Created attachment 89776 [details]
Proposed patch.
Comment 2 Jan Pokorsky 2009-10-21 10:59:57 UTC
What is the difference between this and GeneratorUtilities.importComments? It is already used by java refactoring
plugins to copy tree and its comments.
Comment 3 Jan Lahoda 2009-10-23 13:11:52 UTC
importComments maps (attaches) comments that are in the source code to specified tree (and its descendants). This new
method should copy comments attached that are already attached to the source tree to the target tree. The method also
auto-maps comments to the source tree if they are not yet mapped and the tree originates in the current CompilationUnit,
which is, I think, consistent with TreeUtilities.getComments (which does this auto-map).
Comment 4 Quality Engineering 2009-10-28 11:45:08 UTC
Integrated into 'main-golden', will be available in build *200910280201* on (upload may still be in progress)
User: Jan Lahoda <>
Log: #175020: introducing GeneratorUtilities.copyComments.
Comment 5 Jan Lahoda 2009-10-28 19:45:02 UTC