Skip to content

Organize Imports on save does only work with manual settings.json-edit #1071

@alx1024

Description

@alx1024
Environment
  • Operating System: Win 10
  • JDK version: 11
  • Visual Studio Code version: 1.62.0
  • Java extension version: 1.0.0
  • Java Debugger extension version: 0.36.0
Steps To Reproduce
  1. In any Java Program in any main-function type "File f = new File("/");"
  2. Save File
Current Result

Even with checkbox checked in settings menu "Java > Save Actions: Organize Imports" (which results in

"java.saveActions.organizeImports": true

in settings.json): imports are not automatically organized

Expected Result

Imports are automatically organized on file save with setting checked

Additional Informations

if you modify the settings.json manually to:

"editor.codeActionsOnSave": {
"source.organizeImports": true
}

regardless if Java > Save Actions-option is checked, imports work, but you have to search for this solution on Stackoverflow

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions