I ran into this as well. Unfortunately, there isn't a comprehensive resource that says what all of the XML settings do.
I suggest skimming through the eclipse codebase to try to understand more about specific settings. Some files that helped me a lot:
- DefaultCodeFormatterConstants.java has the actual text name of the XML settings. If you search the end of the setting name (e.g.
alignment_for_annotations_on_parameter
), this is the file you'll find it in. All of the variables will be used elsewhere in the code instead of the setting XML name.
- DefaultCodeFormatterOptions.java is the actual object that gets passed around. Specifically, the Alignment class describes the values of the
alignment_for_*
settings; they're bit flags stored as integers. So as you mentioned, 80 keeps everything on one line unless there's a line break, then it puts each param on it's own line. 80 = 64 + 16, which is the M_NEXT_PER_LINE_SPLIT
constant.
With those two files, searching the code in the formatter folder, and some experimentation (changing the values and seeing how it formats your code), you should be able to get some answers. Ideally, you could directly map those XML settings to their explanations in the eclipse UI, but I haven't been able to do that.
For the Google formatter file specifically, it seems that a lot of the options don't have any effect. Some settings seem to have been deprecated or have changed names, and others, like *.count_dependents
, never existed in the eclipse formatter. Google attempted to merge some improvements upstream but they never made it in, so that file has a lot of settings that don't do anything in eclipse now.