Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 255169

Summary: Source/Generate Getters and Setters should get Insertion points back
Product: [Eclipse Project] JDT Reporter: Christoph Lechleitner <lech>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, stan
Version: 3.4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Christoph Lechleitner CLA 2008-11-13 07:24:06 EST
Build ID: M20080911-1700

Steps To Reproduce:
1. edit a Java file
2. right-click, "source", "generate getters and setters"
3. insertion points "After last method", "Before first method" are missing

More information:
Until 3.3 (or 3.2) the have been more generic insertion poins for generated code, like "After last method" for getters+setters.
In Eclipse 3.4 these got lost or removed for whatever reason.
I'd love to get them back!

Regards Christoph
Comment 1 Dani Megert CLA 2008-11-13 08:36:38 EST

*** This bug has been marked as a duplicate of bug 250713 ***
Comment 2 Christoph Lechleitner CLA 2008-11-13 08:53:01 EST
I refuse to see this one as duplicat of #250713!

The legacy organisation of java sources is:
- member declarations
- constructors
- "real" methods
- getters/setters

When generating getters+setters, my cursor is somewhere in the member declarations, therefore a preselection based on cursor position is totally useless!

Solving #8009 might reduce the annoyingness of this missing feature, but still would not replace what was there for years.
Comment 3 Dani Megert CLA 2008-11-13 09:17:37 EST
>Build ID: M20080911-1700
>
>Steps To Reproduce:
>1. edit a Java file
>2. right-click, "source", "generate getters and setters"
>3. insertion points "After last method", "Before first method" are missing
They are now called 'First Member' and 'Last Member'. If you set it to e.g. 'Last Member' it will use this setting the next time and not the cursor position.

There are no plans to bring the old insertion points back.
Comment 4 Christoph Lechleitner CLA 2008-11-13 09:30:42 EST
Ouch.

I was really sure "First member/Last member" refers to the member declarations, but those do exactly what I need.

So after all it's a misunderstanding, not a bug.

Thanks for the clarification!

Would'nt be "INVALID" or "WORKSFORME" be the better resolution for this "bug"?

Anyway, the current stats is much better than beeing called a duplicate, because now other people that share my misunderstanding can find it ;-))

Comment 5 Dani Megert CLA 2008-11-13 09:50:33 EST
.
Comment 6 Christoph Lechleitner CLA 2008-11-13 10:48:24 EST
For the record a further clarification:

"First member" / "Last member" refer to all members, i.e. variable declcarations as well as methods and constructors. In other words, they point to right after the opening { resp. right before the closing } of the whole class.
Comment 7 Stanislav Marencik CLA 2014-09-23 09:06:00 EDT
I am also missing this feature. Now creating getter and setter at correct place is slow.