-
Notifications
You must be signed in to change notification settings - Fork 453
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
Static imports order #711
Comments
Hey Fabien, long time no see :-) If JDT has the option, then we can expose it. |
Matching issue in upstream JDT: https://bugs.eclipse.org/bugs/show_bug.cgi?id=304415 It's been opened since 2010. Fixing it in vscode-java requires fixing it upstream 1st. Probably not gonna happen anytime soon, unless people massively vote for that feature. |
Hi, I have configured my vscode with working ordering of static imports. "java.completion.importOrder": [
"",
"java",
"javax",
"org",
"com",
"de.mycompany",
"#",
"#de.mycompany"
], All unknown imports will be added first. Then java, javax, org, and com. As of last I want to have static imports. The most important imports are again from my company so I will have them as last. (You have to use # for the ordering of the static imports.) |
Nice discovery here! Yes, according to https://github.com/eclipse-jdt/eclipse.jdt.ui/blob/cb1093315376859558a838c6934880f87921d816/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/ImportOrganizeConfigurationBlock.java#L96 , static imports are prepended by a |
- Fixes redhat-developer#711 Signed-off-by: Roland Grunberg <[email protected]>
- Fixes redhat-developer#711 - Add 'io' to java.completion.importOrder - Make the default of "" & "#" explicit (change is no-op) so the behaviour is understood Signed-off-by: Roland Grunberg <[email protected]>
- Fixes redhat-developer#711 - Make the default of "" & "#" explicit (change is no-op) so the behaviour is understood Signed-off-by: Roland Grunberg <[email protected]>
- Fixes #711 - Make the default of "" & "#" explicit (change is no-op) so the behaviour is understood Signed-off-by: Roland Grunberg <[email protected]>
The organize imports feature puts the static imports at the beginning of the imports block (just after package).
It would be nice to have an option that gives you the choice to put it either at the beginning or at the end.
Environment
Steps To Reproduce
The text was updated successfully, but these errors were encountered: