Bug 7295 - Indendation in generated getters/setters of inner classes
Summary: Indendation in generated getters/setters of inner classes
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P1 trivial (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-06 11:25 EST by Nikolaus Rumm CLA
Modified: 2002-02-12 06:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolaus Rumm CLA 2002-01-06 11:25:37 EST
The generated getter and setter-functions of Java beans are not indented in a 
consistent way. The getters are indented with one tab, whereas the setters have 
two tabs as a prefix for every generated line of code.
Comment 1 Martin Aeschlimann CLA 2002-01-07 05:32:50 EST
Move to jdt.core
The content passed to IType.createMethod is correctly indented for the inner 
class. createMethod seems to add a TAB.

Comment 2 Olivier Thomann CLA 2002-01-07 17:46:37 EST
The problem is the insertion position. The source code for the getters/setters 
is inserted after the tab. This results with an extra tab in from of the first 
line of the added method and the tab is missing in from of the closing brace of 
the type.
It seems that the DOMField are updating their source range positions in the 
normalizeEndPosition method. I don't see any reason for that. The added method 
should contain the extra line breaks. Need to investigate more deeply this 
update.
Comment 3 Olivier Thomann CLA 2002-02-11 11:26:50 EST
Fixed and released in HEAD.