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

Bug 153164

Summary: [getter setter] "this.this..." is generated for getters if code style is set to generate "this"
Product: [Eclipse Project] JDT Reporter: Yi Lin <yi.lin>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Yi Lin CLA 2006-08-08 15:24:46 EDT
In preference Java->Code Style, if "Qualify all generated field access with 'this'" is checked, generated setter/getter will have double "this" generated, for example, "return this.this.myField".
Comment 1 Frederic Fusier CLA 2006-08-09 07:43:51 EDT
Move to JDT/UI
Comment 2 Martin Aeschlimann CLA 2006-08-09 09:56:34 EDT
Did you add 'this.' into the getter setter body templates? (Preferences > Java > Code Style > Code Templates)
You have to change that back to the default value ('return ${field};')
Comment 3 Yi Lin CLA 2006-08-09 10:04:22 EDT
You are right. Thank you.