Reputation: 15
I'm using eclipse code formatter, and I've set maximum line length to 120. If an assignment statement is longer than 120 characters, for example
private Map<Instruction, LocalRegisterAssignmentInformation> instructionRegisterMap = new IdentityHashMap<Instruction, LocalRegisterAssignmentInformation>();
I would like the formatter to wrap this line and make the statement look like this:
private Map<Instruction, LocalRegisterAssignmentInformation> instructionRegisterMap
= new IdentityHashMap<Instruction, LocalRegisterAssignmentInformation>();
But the formatter doesn't seem to wrap it. I tried finding relevant options in the eclipse formatter profile settings, but couldn't find any.
Upvotes: 1
Views: 435
Reputation: 34155
Edit your Java formatter profile as follows:
Upvotes: 1