Formatter alignment policy when multiple elements are present on a line?
I'm writing formatter and it seems that the Alignment object is being misused by
IDEA. To demonstrate, I will pretend we're writing Java formatter. For this:
new Object[] {
"a", "b", "c"
}
Each of those 5 elements (3 strings and 2 commas) has the same Alignment.
However, it looks like the formatter wants this when I move "c":
new Object[] {
"a", "b",
"c"
}
Is this the desired behavior - the last element with the same alignment on the
previous line is used for alignment? Or is it not a known problem and I should
investigate more and build a test case for JIRA?
Please sign in to leave a comment.