styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Difference between intellij and eclipse formatting

Open Lonzak opened this issue 7 years ago • 2 comments

The current eclipse style defines the import options as follows:

<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>

Intellij as follows:

<option name="BLANK_LINES_BEFORE_IMPORTS" value="0" />
<option name="BLANK_LINES_AFTER_IMPORTS" value="0" />

1.) At least the blank line after the imports seems different (1 vs. 0)?

2.) And we have the behaviour that IntelliJ creates a blank between import groups but eclipse does not (which is compliant to the above "blank_lines_between_import_groups" option) Where is the intelliJ option for that?

Lonzak avatar Mar 02 '18 11:03 Lonzak

The blank lines between import groups is covered by #273

Marcono1234 avatar Nov 06 '21 15:11 Marcono1234

I think this issue is related to the formatter used rather than the Organize Imports action per se.

vinaysharma4 avatar Jul 05 '22 10:07 vinaysharma4