Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Open
Assignee
Denis Zhdanov
Subsystem
Code Formatting and Code Style
Affected versions
No Affected versions
Fixed in build
No Fixed in build
  • Created by   Sven Steiniger
    6 years ago (26 Oct 2005 11:58)
  • Updated by   Dmitry Jemerov
    11 months ago (16 Jun 2011 18:55)
  • Jira: IDEADEV-2876
    (history, comments)
 
IDEA-30438 Wrong indention when creating constructor in enum
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
Having:
public enum MyEnum
{
Value1,
Value2;

private int field;
|
}
---
Now generate constructor. It inserts
MyEnum(int field)
{
this.field=field;
}
---
Note that the constructor body is intended by one space but should be two spaces.
Comments (1)
 
History
 
Linked Issues (?)
 
Dmitry Jemerov
  Dmitry Jemerov
31 Oct 2005 19:47
6 years ago
The enum is reformatted correctly after I invoke "Reformat Code" on the entire file. Immediately after "Generate", the enum constructor is indented one space less than the correct indent.