Bug 21229 - PullUp of variable disrupts Javadoc [refactoring]
Summary: PullUp of variable disrupts Javadoc [refactoring]
Status: RESOLVED DUPLICATE of bug 21908
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adam Kiezun CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-07-04 07:51 EDT by Ian Brown CLA
Modified: 2002-08-28 11:43 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Brown CLA 2002-07-04 07:51:04 EDT
Refactoring problem.

When a member variable is selected for PullUp, then it is moved to the parent 
class, and the specifier 'protected' is added to its declaration. This is great.

If the member variable had Javadoc comments with it, then these are moved up to 
the parent class when the refactoring takes place. This is also great.

However, the 'protected' keyword is added /in front/ of the Javadoc comments, 
not between the comments and the variable declaration. This is not so good, and 
will probably exclude the comments from being processed correctly by the 
Javadoc compiler - and just looks wrong etc...

For example, the end result of such a refactoring may well look like this:

    protected /**
     * The filename of the current image
     */
    String filename = null;

Basically a fairly minor problem, but quite a nuisance as it then requires 
manual intervention to correct the code...
Comment 1 Ian Brown CLA 2002-07-04 08:29:22 EDT
To prevent confusion, it is worth mentioning that this is repeatable, but only 
seems to occur when the member variable does NOT already have an access 
modifier (public/protected/private) specified when it the PullUp is started

This is using the 2.0 final release of Eclipse.
Comment 2 Olivier Thomann CLA 2002-07-04 09:36:34 EDT
Move to JDT/UI.
Comment 3 Dirk Baeumer CLA 2002-07-29 09:55:40 EDT
We should check if the field declaration has an associated Java doc comment 
using getJavadoc().
Comment 4 Adam Kiezun CLA 2002-08-28 11:43:39 EDT

*** This bug has been marked as a duplicate of 21908 ***