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
createOption(parent, workingValues, "WhiteSpaceOptions.paren_expr", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_PARENTHESIZED_EXPRESSION, PAREN_EXPR_PREVIEW); 
    }
	private static void createAfterQuestionTree(Map workingValues, final InnerNode parent) {
        createOption(parent, workingValues, "WhiteSpaceOptions.conditional", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_QUESTION_IN_CONDITIONAL, CONDITIONAL_PREVIEW); 
    }
    private static void createAfterSemicolonTree(Map workingValues, final InnerNode parent) {
        createOption(parent, workingValues, "WhiteSpaceOptions.for", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_SEMICOLON_IN_FOR, FOR_PREVIEW); 
    }
    private static void createAfterColonTree(Map workingValues, final InnerNode parent) {
        createOption(parent, workingValues, "WhiteSpaceOptions.conditional", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_CONDITIONAL, CONDITIONAL_PREVIEW); 
        createOption(parent, workingValues, "WhiteSpaceOptions.label", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COLON_IN_LABELED_STATEMENT, LABEL_PREVIEW); 
    }
    private static void createAfterCommaTree(Map workingValues, final InnerNode parent) {
        final InnerNode forStatement= createChild(parent, workingValues, "WhiteSpaceOptions.for"); { 
            createOption(forStatement, workingValues, "WhiteSpaceOptions.initialization", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_FOR_INITS, FOR_PREVIEW); 
            createOption(forStatement, workingValues, "WhiteSpaceOptions.incrementation", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_FOR_INCREMENTS, FOR_PREVIEW); 
        }
        final InnerNode invocation= createChild(parent, workingValues, "WhiteSpaceOptions.arguments"); { 
            createOption(invocation, workingValues, "WhiteSpaceOptions.method", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_INVOCATION_ARGUMENTS, METHOD_CALL_PREVIEW); 
            createOption(invocation, workingValues, "WhiteSpaceOptions.explicit_constructor_call", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_EXPLICIT_CONSTRUCTOR_CALL_ARGUMENTS, CONSTRUCTOR_DECL_PREVIEW); 
            createOption(invocation, workingValues, "WhiteSpaceOptions.alloc_expr", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_ALLOCATION_EXPRESSION, ALLOC_PREVIEW); 
        }
        final InnerNode decl= createChild(parent, workingValues, "WhiteSpaceOptions.parameters"); { 
            createOption(decl, workingValues, "WhiteSpaceOptions.constructor", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_PARAMETERS, CONSTRUCTOR_DECL_PREVIEW); 
            createOption(decl, workingValues, "WhiteSpaceOptions.method", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_PARAMETERS, METHOD_DECL_PREVIEW); 
        }
        final InnerNode throwsDecl= createChild(parent, workingValues, "WhiteSpaceOptions.throws"); { 
            createOption(throwsDecl, workingValues, "WhiteSpaceOptions.constructor", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_CONSTRUCTOR_DECLARATION_THROWS, CONSTRUCTOR_DECL_PREVIEW); 
            createOption(throwsDecl, workingValues, "WhiteSpaceOptions.method", DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_THROWS, METHOD_DECL_PREVIEW); 
        }