Bug 231265 - [override method][code generation] allow to enter new methods at the current cursor location
Summary: [override method][code generation] allow to enter new methods at the current ...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 373196 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-09 04:55 EDT by Martin Aeschlimann CLA
Modified: 2018-01-12 09:00 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Aeschlimann CLA 2008-05-09 04:55:01 EDT
3.4

The code generation actions should offer a option that allows to insert exactly at the current cursor location.
Note that the dialogs had this option in 3.3, but it didn't really add exactly at the cursor position.
Comment 1 Jon Barrilleaux CLA 2008-05-09 11:43:02 EDT
Refer to Bug 122820 for details about what this feature should do and how the previous attempt to implement it in Eclipse fell far short of the mark.
Comment 2 Markus Keller CLA 2011-02-07 13:27:44 EST
An additional "At cursor position" location would be especially handy when the current setting is First/Last member, but it also wouldn't hurt in other cases.
Comment 3 Martin Mathew CLA 2013-06-26 02:51:58 EDT
*** Bug 373196 has been marked as a duplicate of this bug. ***
Comment 4 Lukas Eder CLA 2013-06-26 03:13:52 EDT
I think that the code should *always* be inserted at the cursor position. If it isn't, then it's a bug.

The behaviour documented in Bug 373196 seems to be arbitrary, and thus does not seem to be useful at first sight:

> When executed close to comments, the Override / Import
> feature places generated code at the wrong place. It
> then seems to skip a whole subsequent method before 
> inserting any code. A similar thing happens when trying
> to generate an implementation stub at the end of a 
> class (after a pre-existing comment). The code is not
> added after the comment, but before
Comment 5 Lukas Eder CLA 2018-01-12 09:00:27 EST
Ping :-) This is really annoying me a lot in my code base. Not drastically, but the /r/mildlyinfuriating kind. Is there any chance that this could be reviewed?