Intellij Ultimate. Records formatting.

已回答

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

Hi Aleksandar,

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

0

请先登录再写评论。