Skip to content
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

Open
XuPengfei-1020 opened this issue Nov 26, 2024 · 2 comments
Open

How to use jdk.java.imports.groups #332

XuPengfei-1020 opened this issue Nov 26, 2024 · 2 comments
Labels
Settings/Config If there are missing setting or configaration

Comments

@XuPengfei-1020
Copy link

XuPengfei-1020 commented Nov 26, 2024

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!

@Achal1607 Achal1607 added the Settings/Config If there are missing setting or configaration label Nov 28, 2024
@Achal1607
Copy link
Member

Hey @XuPengfei-1020,
You can read more about this config in extension's README:

jdk.java.imports.groups has default value as given below.

[
  "java",
  "javax",
  "org",
  "com",
  ""
]

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.

@XuPengfei-1020
Copy link
Author

XuPengfei-1020 commented Dec 3, 2024

@Achal1607 Thanks for your reply!
I want to know hwo to specify static imports, is there a way to specify a group that present import static ....?
What the final order result I want is like this:

import com...
import io...
// empty line
import javax...
// empty line
import java...
// empty line
import static ....

This rule in my project is enforced by others and I can not changing, so I need a import order config to according it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Settings/Config If there are missing setting or configaration
Projects
None yet
Development

No branches or pull requests

2 participants