-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
7 changed files
with
119 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
testlib/src/main/resources/java/importsorter/JavaCodeSortedImportsSubgroups.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import java.awt.*; | ||
import java.lang.Runnable; | ||
import java.lang.Thread; | ||
import java.util.*; | ||
import java.util.List; | ||
import javax.annotation.Nullable; | ||
import javax.inject.Inject; | ||
|
||
import org.dooda.Didoo; | ||
import static com.foo.Bar; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; | ||
|
||
import static java.lang.Exception.*; | ||
import static java.lang.Runnable.*; | ||
import static org.hamcrest.Matchers.*; |
15 changes: 15 additions & 0 deletions
15
testlib/src/main/resources/java/importsorter/JavaCodeUnsortedImportsSubgroups.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import static java.lang.Exception.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.*; | ||
import org.dooda.Didoo; | ||
import java.util.List; | ||
import javax.inject.Inject; | ||
import java.lang.Thread; | ||
import java.util.*; | ||
import java.lang.Runnable; | ||
import static org.hamcrest.Matchers.*; | ||
import javax.annotation.Nullable; | ||
|
||
import static java.lang.Runnable.*; | ||
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo; | ||
import static com.foo.Bar | ||
import java.awt.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters