Reputation: 974
I've started working with Intellij (used Eclipse before), and I can't seem to mimic the eclipse formatting
the Eclipse Code Formatter plugin did most of the work, but there are still some differences.
for example:
Original line:
object.add(new ClassForSomething(param1, param2, paramObj.method()));
with IntelliJ formatting:
object.add(new ClassForSomething(param1, param2, paramObj
.method()));
with Eclipse formatting:
object.add(new ClassForSomething(param1, param2,
paramObj.method()));
where do I find the configuration to adjust my intelliJ formatter to what I used to have on the eclipse?
EDIT 1: I've uploaded my code style --> wrapping and braces configuration
Upvotes: 2
Views: 1657
Reputation: 47995
In Preferences > Editor > Code Style > Java > Wrapping and Braces
Here's a screenshot:
I reproduced the method splitting behaviour you described and then 'fixed' it with the settings I propose here. However, there are so many formatter configurations, some of which impact each other, that it's possible I haven't reproduced exactly what you are seeing. If so, then I'd suggest trying the following:
Preferences > Java > Code Style > Formatter
and export the settings to an XML file via the Export All button) and then import that into IntelliJ (see screenshot below) ... perhaps IntelliJ can work out the correct configuration from the Eclipse formatter.Upvotes: 4
Reputation: 105
Check File -> Settings -> Code Style -> Java -> Wrapping and Braces. Make sure "Chained method calls" is set to "Do not wrap" and two squares are unchecked.
Upvotes: 1