'Is there a way to auto update imports and package names from class path IntelliJ

I have a tendency to keep switching code from different projects sometimes in bulk. I have to press alt-enter all the time because IntelliJ won't auto update the package declaration. They already have knowledge of the classpath. Is there a way to automate this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source