I am using Python plugin to handle Python code inside an IntelliJ Java project.
I have selected refactoring "Move -> move everything to another directory..." but it doesn't update the imports!
Example, I have:
import my_server.my_project.helpers.cumulative_functions as cf
That instead should be now
import my_project.helpers.cumulative_functions as cf
Have I done something wrong? Is there a way to fix that?
Press Ctrl+Alt+S to open the IDE settings and select Tools | Actions on Save. Enable the Optimize imports option. Additionally, from the All file types list, select the types of files in which you want to optimize imports. Apply the changes and close the dialog.
Press Ctrl+Alt+M or from the main menu, select Refactor | Extract | Method. In the dialog that opens, configure a method options, such as visibility, parameters, and so on. You can also change a name of the method if you need. Click OK.
Move Package Dialog Click the ellipsis button, and select the target package in the Choose Destination Package dialog that shows a tree view of all packages within the project. The content of a package is moved along with the package from the old location to the new destination package.
This is common in PyCharm
and IntelliJ
The problem here is working directory and run/debug config
Even when you move files, wd stays the same
It is a confirmed bug, but it's not still fixed
You can vote for it to be fixed faster
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With