Skip to content

"java.saveActions.organizeImports" setting doesn't work on Windows #2207

Open
@testforstephen

Description

This issue is originally created by @alx1024 at microsoft/vscode-java-debug#1071

[provide a description of the issue]

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

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions