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 126907 - Refactoring should parse javadoc and perform changes in it
Summary: Refactoring should parse javadoc and perform changes in it
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ralph Ruijs
URL:
Keywords: PLAN
Depends on:
Blocks:
 
Reported: 2008-02-07 12:53 UTC by mikbra
Modified: 2015-02-16 14:06 UTC (History)
0 users

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 mikbra 2008-02-07 12:53:25 UTC
In the following code:

/** MyClass. Call {@link #foo} whenever. */
public class MyClass {
    public void foo() { ... }
}

When renaming (refactor) the method foo, the javadoc link "{@ #foo}" does not get updated. The same goes for renaming fields and classes.
Comment 1 Jiri Prox 2008-02-07 13:20:18 UTC
Have you check "Apply Rename on Comments" checkbox?
Comment 2 mikbra 2008-02-07 13:40:31 UTC
I'm doing "instant rename", i.e. pressing CMD+R (on a Mac) when the cursor is placed on the thing (field, method, etc) I want to rename. No dialog is shown.
Comment 3 mikbra 2008-02-07 13:54:39 UTC
Also, the checkbox "Apply Rename on Comments" only seems to do a string replace, which may be wrong. It should _analyze_ the Javadoc.

Say that I have the following code:

/** MyClass is really cool. Call {@link #cool} whenever. */
public class MyClass {
    public void cool() { ... }
}

Then I want to rename (refactor) the method "cool" to "stupid". I do not want to update my javadoc to say that "MyClass is really stupid", I only want to 
update the link.
Comment 4 Jiri Prox 2008-02-07 16:20:44 UTC
The problem with instant rename is duplicate of issue 102669.
The string replace is as designed, so it works in all types of comments.  You can turn off some replacements in preview. 

-> I'm changing the summary and switching this issue to enhancement.