Intellij Ultimate. Records formatting.

Answered

Hello,

Our team wants to change formatting of java records to the format pasted blow. Basically:

  • Every field on a new line.
  • Every annotation on a new line.
public record CreditTransaction(@NotBlank
@JsonProperty("PlayerId")
String playerId,
@NotBlank
@JsonProperty("GameId")
String providerGameId,
@NotBlank
@JsonProperty("RoundId")
String providerRoundId,
@JsonProperty("BetId")
String betId,
@NotBlank
@JsonProperty("TransactionId")
String providerTransactionId,
@JsonProperty("RefTransactionId")
TreeSet<String> providerBetId,
@IpmCreditTypeConstraint(allowedTypes = {IpmCreditType.SETTLE}, message = "Type not allowed")
@JsonProperty("Type")
IpmCreditType providerTransactionType,
@NotBlank
@JsonProperty("Currency")
String currencyCode,
@NotBlank
@JsonProperty("Amount")
String amount) {
}
0
1 comment

Hi Aleksandar,

Some formatting functionality is not available for records yet. Please upvote https://youtrack.jetbrains.com/issue/IDEA-298007

0

Please sign in to leave a comment.