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
{{ message }}
Repository navigation
Organize Imports should automatically add required modules in module-info #1388
I think it'd be nice to also handle adding the requires entry when using the "Organize Imports" command instead of having to do activate the quick fix separately; I think that'll need to be handled upstream in jdt.core though, since currently the upstream "Organize Imports" also doesn't add the requires entry to the module-info.java
Activity
robstryker commentedon Oct 29, 2026
I've given this a quick test. Organize imports properly adds the import.
However, eclipse will have a
ctrl+1suggestion to add the module to module-info.java, and vscode-java does not do this.@shin19991207 When you're not busy, do you think you can look into why this particular suggestion doesn't exist? :D
datho7561 commentedon Nov 4, 2026
I think it'd be nice to also handle adding the
requiresentry when using the "Organize Imports" command instead of having to do activate the quick fix separately; I think that'll need to be handled upstream in jdt.core though, since currently the upstream "Organize Imports" also doesn't add therequiresentry to themodule-info.javadatho7561 commentedon Nov 4, 2026
@shin19991207 if you have time, do mind investigating what I mentioned as well? It might require changes in jdt.core.manipulation (under jdt.ui)