Reformat code - line break in string
Answered
I have some problems configuring my intellij to how I want it to reformat code:
I have the code (generated from swagger doc)
@ApiModelProperty(example = "0", value = "Flag for prompting the user to confirm their phone number")
Currently, intellij reformats this to:
@ApiModelProperty(example = "0", value = "Flag for prompting the user to confirm their phone "
+ "number")
but I would like it to format it to:
@ApiModelProperty(example = "0",
value = "Flag for prompting the user to confirm their phone number")
So that it breaks on the parameters instead of the string. Is this possible?
Please sign in to leave a comment.
Hi. Related settings are in Editor | Code Style | Java | Wrapping and Braces | * Annotation
Thank you for your answer. I can't seem to find a setting that controls this? When playing around with the settings, it always breaks in the string instead of moving the property to another line. Do you know which property it is, and what it should be set to?
Editor | Code Style | Java | Wrapping and Braces | Annotation with parameters - Wrap always + align when multiline, works fine:
Awesome, that works. Thanks :)
Seems obvious now you pointed it out.