Triggering "auto import" in bulk
Answered
I am looking for a way to trigger "auto import" of unambiguous imports on all my files.
My Java classes code is generated from a modelling tool. Annotation are included, such as lombocks @Data
So the class code needs a line
import lombok.Data;
which the model cant geenrate.
So I have switched on auto import on unambiguous imports, but that only triggers when there is a change in the file.
I found running e.g. FindBugs, on all the files helps as the auto import is triggered when the file is opened - saving having to press the space bar!
But I have dozens of files to open.
Is there a way to trigger auto import in bulk?
Please sign in to leave a comment.
Should have clarified, I am copying the auto generated code into the source code directory of the project using Windows Explorer. This is why the Intellij front end is not seeing changes in the code that would trigger the auto import.
Hello,
Unfortunately there is no feature in IntelliJ IDEA for fixing missing unambiguous imports in batch mode. Please follow some related discussions on this topic:
https://youtrack.jetbrains.com/issue/IDEABKL-6250
https://youtrack.jetbrains.com/issue/IDEABKL-6064
Thank you