Summary: | Deleting method does not delete generated non-Javadoc comment | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Nick Edgar <n.a.edgar> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | akiezun, klicnik, Olivier_Thomann |
Version: | 2.0 | ||
Target Milestone: | 2.0 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | 9790 | ||
Bug Blocks: |
Description
Nick Edgar
2002-02-11 10:34:47 EST
There is a preference in Java>Code Generation that allows you to set whether an overridden method should be an ordinary comment or a javadoc comment. We should change the default so that a javadoc comment is generated. i'd vote for generating javadoc Non-javadoc comments are never part of the method declaration. This is why they are not deleted when deleting the method. We should always set the comments to be javadoc comments for overriden methods. Do you know if there are some conventions for this? In Eclipse UI we've generally been using non-Javadoc comments for overridden methods, flagging it as intentionally non-Javadoc and indicating where the method was originally declared. e.g. /* (non-Javadoc) * Method declared on ISelectionListener */ public void selectionChanged(SelectionEvent event) { // handle selection changed } If you don't have a Javadoc comment on the implementation method, Javadoc copies down the spec from the interface or superclass method. I would vote for having JavaCore extending the source range of the method to include preceding non-javadoc comments. btw, you can already configure in the codegeneration preference page if you want non-javadoc comments or real javadoc comments. moving to jcore to extend the element ranges to also include non javadoc comments Including the non-javadoc comments as part of the method definition has a lot of side-effects. I would say the fix is to generate overriden methods with javadoc comments. So changing the default to have javadoc comment on overriden methods seems to be a good idea. If you want to keep non-javadoc comment, then you will leave with residual comments left behind after method deletion. *** This bug has been marked as a duplicate of 11056 *** |