In my case, my formatter setting is in .setting/org.eclipse.jdt.core.prefs.
Actually, this article works, I've tested by creating a new project for comparison. I couldn't understand why is that worked on that new project, while my main project didn't. So, I compared any project settings that applied to each project, and I found that difference in .setting/org.eclipse.jdt.core.prefs file.
Location of .setting/org.eclipse.jdt.core.prefs
My new project has only a compiler setting in that file, while my main project has compiler + formatter setting, that's why setting in JSON file couldn't apllied.
My solution is to change the value of formatter setting in that file with the same value from my exported xml formatter (I got my formatter XML exported from eclipse). Thanks.
This is my new project content of .setting/org.eclipse.jdt.core.prefs:
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
and this is what's inside my main project:
...
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns
...