Community
Participate
Working Groups
Build Identifier: M20090211-1700 The dialog 'Override/Implement Methods' which can be accessed from the 'Source' sub menus lacks two crucial functionality: 1. Insertion point: Although it has a great way of inserting into a relative position (first/last/after), in reality it is often desired to insert at the current cursor position. 2. Generate method comments: When this check-box is clicked, we should also have another check-box allowing for the possibility of copying (verbatim) the overriding/implementing method's Javadoc. Although enhancement request #2 can be considered a 'nice-to-have', I believe that feature request #1 is an absolute must for a great IDE. Reproducible: Always Steps to Reproduce: n/a
> 1. Insertion point: Although it has a great way of inserting into a relative > position (first/last/after), in reality it is often desired to insert at the > current cursor position. If your current setting is "First/Last member", just select an "After ***" location once, and from then on, the dialog will pre-select the member at the current cursor location. See bug 231265 for an explicit "At cursor position". > 2. Generate method comments: When this check-box is clicked, we should also > have another check-box allowing for the possibility of copying (verbatim) the > overriding/implementing method's Javadoc. Usually, you don't have to copy anything, since the Javadoc tool and the Eclipse hovers already show the doc from the overridden method. If you want to make this explicit, you can change your code templates to put {@inheritDoc} there. We have no plans to add this feature, since copying Javadoc is bad style and generates an unnecessary maintenance problem.
(In reply to comment #1) I have read the bug 231265 and its previous threads that you have provided for me (thanks). What I can deduce is that people actually want this feature, but there are some which oppose it? The "First/Last member" doesn't even remotely come close to doing what is being requested by myself or others? For one it's not clear whatsoever with the 'first/last member'. Second, I've tried using the 'first/last member' with 3.4.2 and it doesn't work, I must go out and search the method after the operation. After having read the bug thread, I understand the technical issues that may be involve, but maybe someone is trying too hard? If I have a method which I copied from somewhere else (CTRL-C) and I put my cursor at some place in my Java file and type CTRL-V to paste it... it works! Why can't that simply be done? If I put my cursor in the middle of a comment, I can still (erroneously) paste it there, which is my fault if I didn't choose the proper location. So why are we trying to be so smarter with the "Insert at cursor position"? Just insert it exactly where the cursor is at regardless (and avoid babysitting the programmer)? > Usually, you don't have to copy anything, since the Javadoc tool and the Eclipse hovers already show the doc from the overridden method. If you want to make this explicit, you can change your code templates to put {@inheritDoc} there. I'm aware of those features. But in some cases your overriding the method in order to alter the behavior, for which you want to change the Javadoc to document those exceptions but keep the bulk of the documentation and formatting. Or you simply want to complement the documentation by inserting a small code example or table. Would save me going to cut/copy it from the original file all the time.
>3.4.2 and it doesn't work, I must go out and search the method after the >operation. There were bugs that got fixed in that area. I suggest you move up to 3.6.1 or upcoming 3.6.2.