1

Is there an option in IntelliJ Idea 15.0.3 to optimize the imports in all files of a custom scope or matching a file name pattern?

The dialog for "Code | Optimize imports" does not have such an option. The dialog for "Code | Reformat Code" has an option to restrict the operation to some scope or file mask but it also reformats code that does not match the code style, which I do not want.

Is there another option (maybe in some plugin?) or a simple workaround to just optimize the imports of some files of a certain type?

ahu
  • 1,492
  • 12
  • 11

1 Answers1

1

Idea 15.0.3 does not have such an option.

Here's a very old request for this feature: https://youtrack.jetbrains.com/issue/IDEABKL-5372

I now wrote a custom plugin for this purpose: https://plugins.jetbrains.com/plugin/8188

Community
  • 1
  • 1
ahu
  • 1,492
  • 12
  • 11