Project: JDT
Bug 66880 single line comments sometimes lost on copy/paste of methods [ccp]
Reported: 2004-06-14 03:31:17 | Status: verified fixed

I've marked this as critical, since I do consider it "losing data", even though it could be argured its still in repository, or user should have known better, or something. My main concern is that someone could work all afternoon, losing comments here and there, and not really noticing until too late to easeily fix. (And, nothing was in log). The typical case I test with had a simple method with comments before and after, eg. // gold public void Test55() { } // silver Then, from the outline view, select Test55 and either cut it, and copy to another Java Class, or even moving it within same file seem to show same effect. The effect is that usually (but not always) both comments are "cut" with method, but when pasted in new location, only one of them are there. Sometimes, neither of them are there! So, either unpredicable, or I didn't do enough to see the pattern. By the way, I'm well aware that such comments are ambiguous in terms of where they should go (or not go) in such cases -- I'd almost vote for leaving them completely alone, given the late date -- rahter than chance losing them.

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/TypedSource.java