You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for group of imports without blank lines between groups
To keep compatibility with existing configuration, a special delimiter `|` is introduced to separate subgroup of imports inside a group.
For example "java|javax" will not generate a blank line between the java group and the javax group.
The notion of ImportsGroup has been introduced for clarification, allowing code has been simplification.
Fixes#1375
// note: you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports
Copy file name to clipboardExpand all lines: plugin-maven/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,8 +181,8 @@ any other maven phase (i.e. compile) then it can be configured as below;
181
181
<importOrder /> <!-- standard import order -->
182
182
<importOrder> <!-- or a custom ordering -->
183
183
<wildcardsLast>false</wildcardsLast> <!-- Optional, default false. Sort wildcard import after specific imports -->
184
-
<order>java,javax,org,com,com.diffplug,,\\#com.diffplug,\\#</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
185
-
<!-- you can use an empty string for all the imports you didn't specify explicitly, and '\\#` prefix for static imports. -->
184
+
<order>java|javax,org,com,com.diffplug,,\\#com.diffplug,\\#</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
185
+
<!-- you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports. -->
186
186
</importOrder>
187
187
188
188
<removeUnusedImports /> <!-- self-explanatory -->
@@ -286,8 +286,8 @@ These mechanisms already exist for the Gradle plugin.
286
286
287
287
<importOrder /> <!-- standard import order -->
288
288
<importOrder> <!-- or a custom ordering -->
289
-
<order>java,javax,org,com,com.diffplug,,\\#com.diffplug,\\#</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
290
-
<!-- you can use an empty string for all the imports you didn't specify explicitly, and '\\#` prefix for static imports -->
289
+
<order>java|javax,org,com,com.diffplug,,\\#com.diffplug,\\#</order> <!-- or use <file>${project.basedir}/eclipse.importorder</file> -->
290
+
<!-- you can use an empty string for all the imports you didn't specify explicitly, '|' to join group without blank line, and '\\#` prefix for static imports.-->
0 commit comments