redhat-developer / redhat-developer/vscode-java
Organize Imports should automatically add required modules in module-info
Open
@snjeza is already working on this.
Since Apr 13, 2020.
code action
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
When I do Organize Imports, I'd like for the module-info.java file to be updated automatically as well.
Environment
- Operating System: Windows 10
- JDK version: 14
- Visual Studio Code version: 1.44.0
- Java extension version: 0.59.1
Steps To Reproduce
- create a file
App.javaas below inside a modular project - do
Organize Imports
class App {
void run() {
HttpClient client;
}
}
Current Result
After importing java.net.http.HttpClient, the module-info.java file is unchanged.
Expected Result
The module-info.java file is automatically updated with:
requires java.net.http;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.