Skip to content

Organize Imports action on multiple files #1107

Open

Description

@albertosantini

I have a lot of import x statements to fix on different files contained in different repositories under the same workspace.

See also #490 (comment) and I didn't find the follow-up, so I open this issue.

@fbricon Am I missing anything? Thanks in advance.

Activity

  1. HerrDerb commented on Jul 10, 2023

    @HerrDerb

    would love this

  2. oliviercailloux commented on Jul 7, 2025

    @oliviercailloux

    Why is this closed, is it done? I cannot find it in recent vscode versions. This issue seems to be the one used to track progress.

  3. oliviercailloux commented on Jul 7, 2025

    @oliviercailloux

    Note that this extension could perhaps be leveraged to provide this feature, assuming that vscode-java could provide a “source.organizeImports code action”.

  4. oliviercailloux commented on Jul 7, 2025

    @oliviercailloux

    … and as a workaround, I have successfully used this extension.
    Open the user settings.json and add the following element.

      "commandOnAllFiles.commands": {
        "Organize imports": {
          "command": "editor.action.organizeImports",
          "includeFileExtensions": [
            ".java"
          ]
        }
      }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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