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.
I would like to add a GeneratorUtilities.copyComments method, which would copy comments from one tree to another tree.
Created attachment 89776 [details] Proposed patch.
What is the difference between this and GeneratorUtilities.importComments? It is already used by java refactoring plugins to copy tree and its comments.
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).
Integrated into 'main-golden', will be available in build *200910280201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/8aaaec451143 User: Jan Lahoda <jlahoda@netbeans.org> Log: #175020: introducing GeneratorUtilities.copyComments.
Integrated.