wmyywm / eclipse-code-formatter-intellij-plugin

Automatically exported from code.google.com/p/eclipse-code-formatter-intellij-plugin
0 stars 0 forks source link

Eclipse 4.2.1 exported formatter gives unexpected formatting #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I exported eclipse formatter from eclipse juno 4.2.1 and imported in intellij 
12 Ultimate Edition. The code formats correctly in eclipse but in intellij, the 
indentation is messed up. In intellij if i put an if statement or try statement 
inside for loop, it keeps the nested block with same indentation.

I have attached screenshots and the formatter that i use.

Original issue reported on code.google.com by neu...@gmail.com on 26 Nov 2013 at 10:56

Attachments:

GoogleCodeExporter commented 9 years ago
Forgot to mention that i am using version 4.0.0 of Eclipse Code Formatter with 
Intellij Ultimate Edition - build # 129.1359

Original comment by neu...@gmail.com on 26 Nov 2013 at 10:58

GoogleCodeExporter commented 9 years ago
It is formatted all right, but how it looks in IntelliJ editor is determined by 
code style settings of intellij. 

Go to Settings | Code Style | Manage... | import eclipse-formatter.xml file, 
and use that profile.

Original comment by vojta.kr...@gmail.com on 27 Nov 2013 at 9:08

GoogleCodeExporter commented 9 years ago
Btw it is not very good to use mixed tabulation

Original comment by vojta.kr...@gmail.com on 27 Nov 2013 at 9:16

GoogleCodeExporter commented 9 years ago
Thank you so much. I did not realize it was because of mixed mode indentation. 
I modified it to use tabs only for indentation. 

Original comment by neu...@gmail.com on 27 Nov 2013 at 3:11