Bug 49243 New code formatter: missing feature
The new code formatter seems to do everything and cater to all tastes. However, it still does not cover one aspect of how I format code. I like to do for-s like this: for (int i=1 ; i<10 ; i++) {} (note spaces surrounding ;-s). However, I do NOT want a space before ;-s anywhere else (ideology: in other places ; is a terminator, in the for it is a separator). The reason I can't do this is that the "space before ;" has been factored out to the level of control statements and cannot be set specifically for the for statement.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java
private final static PreviewSnippet FOR_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "for (int i= 0, j= array.length; i < array.length; i++, j--) {}" 
    );
    private final static PreviewSnippet WHILE_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "while (condition) {}; do {} while (condition);" 
    );
    private final static PreviewSnippet CATCH_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "try { number= Integer.parseInt(value); } catch (NumberFormatException e) {}"); 
    private final static PreviewSnippet IF_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "if (condition) { return foo; } else {return bar;}"); 
    private final static PreviewSnippet SYNCHRONIZED_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "synchronized (list) { list.add(element); }"); 
    private final static PreviewSnippet SWITCH_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "switch (number) { case RED: return GREEN; case GREEN: return BLUE; case BLUE: return RED; default: return BLACK;}"); 
    private final static PreviewSnippet CONSTRUCTOR_DECL_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_CLASS_BODY_DECLARATIONS, 
    "MyClass() throws E0, E1 { this(0,0,0);}" +  
    "MyClass(int x, int y, int z) throws E0, E1 { super(x, y, z, true);}"); 
    private final static PreviewSnippet METHOD_DECL_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_CLASS_BODY_DECLARATIONS, 
    "void foo() throws E0, E1 {};" +  
    "void bar(int x, int y) throws E0, E1 {}"); 
    private final static PreviewSnippet ARRAY_DECL_PREVIEW= new PreviewSnippet(