Bug 151476 - Move method: prepended comments are removed
Summary: Move method: prepended comments are removed
Status: RESOLVED DUPLICATE of bug 150558
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-21 17:20 EDT by Michael Schneider CLA
Modified: 2006-07-27 05:01 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 Michael Schneider CLA 2006-07-21 17:20:15 EDT
When a method is moved to another class, all '//' comments directly prepending this method are silently removed.

For example:

  public class C  {

    D aD;
    
    // Here is some comment
    
    public void f() { }
    
  }

When now moving (ALT+SHIFT+V) method 'f' to class 'D', 
also the comment '// Here is...' is removed. This is bad,
because such a comment in general must be regarded as related
to method f(). In the worst case (which happend to me), the
comment is some important outcommented code (in my case
it were a bunch of JUnit testcases, which I had planned 
to use later in the future).

Proposed fix: Do not remove prepending comments.
Comment 1 Martin Aeschlimann CLA 2006-07-27 05:01:18 EDT

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