-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use jdk.java.imports.groups
#332
Comments
Hey @XuPengfei-1020,
You can modify this in the user settings level or at the workspace level as shown in the README. Please let us know if there are any further queries. We would love to help you out. |
@Achal1607 Thanks for your reply!
This rule in my project is enforced by others and I can not changing, so I need a import order config to according it. |
I have the same question. I'd like to order the imports the same way as IntelilJ because other members of my team use it. With the Java extension from Red Hat it's possible to achieve with this configuration:
|
I confirm that with the Red Hat extension it is working, but I had other issues with that extension and I'd like to use the Oracle one. |
Hi @XuPengfei-1020, @szolotarev-scaleapps, @ccontino84. You may use the group value For example, to place all the static imports after the other imports, you may set: "jdk.java.imports.groups": [
"java",
"javax",
"org",
"com",
"",
"static *"
] In case you wish to have static imports of a particular package root, say "com.mycompany.myteam", together with other imports from the same root, you may use: "jdk.java.imports.groups": [
"com.mycompany.myteam",
"static com.mycompany.myteam",
"java",
"javax",
"org",
"com",
"",
"static *"
] I hope this helps you easily achieve the common formatting standards of your team, and more. |
How to present
import static ....
items?How to make a separator empty line between tow groups?
How to present other groups which not specified in the settings?
It there a documention of the grammar?
Thanks!
The text was updated successfully, but these errors were encountered: