Community
Participate
Working Groups
Created attachment 250595 [details] Eclipse project showing issue Not quite sure if I'm raising this against the right component... I have a simple source file and format on save setup (with extra configuration). On first save the file turns into this: === package pkg; import java.util.Arrays; import java.util.HashSet; import java.util.Set; enum Color { RED, GREEN, BLUE } class SB { public SB addAll(Object o) { return this; } public SB build() { return this; } } public class RMB { private static final Set<Object> x = new HashSet<Object>(Arrays.asList(new Color[] { Color.RED, Color.GREEN, Color.BLUE })); private static final Object o = new SB() .addAll("ABC") .addAll("DEF") .addAll("GHI") .build(); } === On second save (just made a whitespace change in the file) the formatting in RMB flips to this: === public class RMB { private static final Set<Object> x = new HashSet<Object>(Arrays.asList(new Color[] { Color.RED, Color.GREEN, Color.BLUE })); private static final Object o = new SB() .addAll("ABC") .addAll("DEF") .addAll("GHI") .build(); } === Another whitespace change and it flips back to the first option, and so on - this is causing real issues for the team here as it constantly shows outgoing git changes when nothing is actually changing. I've attached a zip of the project containing this file and the ui/core prefs. In terms of save actions I simply opened preferences and in saved actions set it to 'Perform the selected actions on save' and 'Format source code' 'format all lines'. The extra config in ui/core prefs files was supplied to me, I haven't dug into it to see which setting is triggering the problem.
*** This bug has been marked as a duplicate of bug 439582 ***