| Summary: | Pull up and Push down refactoring loses the javadoc | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Dan Campers <campers> |
| Component: | UI | Assignee: | Tobias Widmer <tobias_widmer> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=326832 | ||
| Whiteboard: | |||
|
Description
Dan Campers
Sounds to be a JDT/UI issue as Move actions works properly... Dan, I tested it with the following case:
public class X {
}
class Sub extends X {
/**
* Comment for foo
* @param l
*/
void foo(List l) {
}
}
and the javadoc is correctly moved as well.
Can you provide additional steps to reproduce the problem ?
Please ensure that Javadoc processing is enabled on the Javadoc preference page Enabling javadoc processing in the preferences fixes the problem for Pull Up and Push Down. What got me is that when javadoc processing is *not* selected, the Move and Move Member Type To New File refactorings do copy the javadoc across, but the Push/Pull don't. Perhaps Push/Pull should also always copy the javadoc across, rather that delete it, even when javadoc processing is not selected? If you dont want the javadoc validations, you probably still don't want your javadocs to disappear when you refactor! Dan The problem is that Move and Move Member Type do not copy AST nodes, but rather entire source ranges. This is not possible for pull up and push down, since the source itself must be modified. Since disabling javadoc validation is not necessary in practice to get warning-free code, closing as works for me. |