Hi,

after I received the comment to follow PDFBox coding style and use the provided 
settings for the eclipse formatter, I tried to import the eclipse settings into 
IntelliJ (the IDE I usually use) and received an error. I investigated and 
found out that two of the settings caused a problem:

 * <setting 
id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" 
value="120"/>
 * <setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" 
value="120"/>

The import works if I delete these two lines. Now I wouldn't bother to report 
it here, but I opened IDEA-315699 (
https://youtrack.jetbrains.com/issue/IDEA-315699), and they closed it saying 
that "120" is indeed an incorrect value although eclipse accepts it (but 
according to them, eclipse treats it as "0").

If you think this would be worth fixing, I would do this:
* do a clean checkout of trunk
* reformat the complete code with the provided formatter settings
* do the same once more but with the two lines mentioned above removed/set to 
"0"
* check if there are any differences
* if there are no differences, provide a patch for the formatter file

Would such a patch be accepted? I think it might help other potential 
contributors if they can just apply the formatter settings in their preferred 
IDE.

Alternatively, I could provide a matching IntelliJ or EditorConfig file 
(editorconfig should also work with other IDEs/editors such as VS code, and 
others).

Cheers,
Axel

Reply via email to